Skip to content

Commit 171044c

Browse files
committed
Add downstream migration guide for the explicit-feature model
Publishes docs/migration_guide.md explaining the impact of no_legacy_features, which previously implicit behaviors are now opt-in, and how consumers restore them explicitly via target/package features, --features flags, opt-in features, and the extra_*_flags toolchain attributes. Links the guide from the README, features.md, and extension_api.md. resolves #81
1 parent e5b059c commit 171044c

4 files changed

Lines changed: 375 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ validates the setup, and how QNX-specific authentication and licensing fit in.
3333
- [Extension API](docs/extension_api.md)
3434
- [Generation flow](docs/generation_flow.md)
3535
- [Toolchain features](docs/features.md)
36+
- [Migration guide (explicit-feature model)](docs/migration_guide.md)
3637
- [Tests and validation](docs/tests_and_validation.md)
3738
- [QNX integration](docs/qnx_integration.md)
3839
- [Test Suite](docs/test_suite.md)

docs/extension_api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ configuration such as:
107107
The test workspace under `tests/` provides complete `.bazelrc`
108108
configurations for this activation step.
109109

110+
## Migrating Downstream Workspaces
111+
112+
The generated toolchains run under Bazel's explicit-feature model
113+
(`no_legacy_features`), so behaviors Bazel used to add implicitly are not
114+
automatic. For the behavioral impact and how consumers restore supported
115+
behavior explicitly, see the
116+
[Migration guide](migration_guide.md).
117+
110118
## Behavior Notes
111119

112120
- The extension is intended for the root module.

docs/features.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Both toolchains enable **`no_legacy_features`**, which turns off the features
99
Bazel would otherwise add implicitly. As a result every flag the toolchain emits
1010
comes from a feature defined explicitly below.
1111

12+
> **Migrating from an implicit/legacy setup?** See the
13+
> [Migration guide](migration_guide.md) for the behavioral impact of
14+
> `no_legacy_features` and how to restore supported behavior explicitly.
15+
1216
Each entry is tagged with the platform(s) it applies to: **(both)**, **(Linux)**,
1317
or **(QNX)**. Unless noted as *opt-in (disabled by default)*, a feature is
1418
enabled by default.
@@ -32,7 +36,8 @@ enabled by default.
3236
- **`default_compile_flags`** (both) — Core compile flags plus `dbg`/`opt`
3337
build-mode variants (exact flags differ per target).
3438
- **`pic`** (Linux) — Emits `-fPIC` when the `pic` build variable is available.
35-
(On QNX `-fPIC` is part of the default compile flags.)
39+
QNX declares the `supports_pic` capability marker but does not add `-fPIC` in
40+
the default compile flags.
3641
- **`random_seed`** (both) — Emits `-frandom-seed=<output_file>` for
3742
deterministic output.
3843
- **`include_paths`** (both) — Emits `-iquote` / `-I` / `-isystem` from the
@@ -82,8 +87,10 @@ the relevant build mode is active. All are enabled by default except where noted
8287
(disabled by default)**, since it forces static linking for every target and
8388
requires static system archives (unavailable on some toolchains, e.g. AutoSD).
8489

85-
## Warnings (all opt-in / disabled by default)
86-
- **`minimal_warnings`** (both) — Baseline warning set.
90+
## Warnings
91+
Opt-in / disabled by default unless noted otherwise.
92+
- **`minimal_warnings`** (both) — Baseline warning set (includes `-Wall`).
93+
Enabled by default on QNX; opt-in (disabled by default) on Linux.
8794
- **`strict_warnings`** (both) — Stricter warnings; implies `minimal_warnings`.
8895
- **`all_wall_warnings`** (Linux) — Broadest warning set; implies `strict_warnings`.
8996
- **`warnings_as_errors`** (both) — Adds `-Werror`.

0 commit comments

Comments
 (0)