Skip to content

Commit 49cabaa

Browse files
committed
update documentation
move the unstable `-Clinker-features` documentation to the stable book, as there's only a single feature, and it is now stable
1 parent 37df80a commit 49cabaa

File tree

2 files changed

+11
-41
lines changed

2 files changed

+11
-41
lines changed

src/doc/rustc/src/codegen-options/index.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,22 @@ flag for another way to specify the linker.
244244

245245
## linker-features
246246

247-
This flag allows enabling or disabling specific features used during linking.
247+
The `-Clinker-features` flag allows enabling or disabling specific features used during linking.
248+
249+
These feature flags are a flexible extension mechanism that is complementary to linker flavors,
250+
designed to avoid the combinatorial explosion of having to create a new set of flavors for each
251+
linker feature we'd want to use.
248252

249253
The flag accepts a comma-separated list of features, individually enabled (`+feature`) or disabled
250254
(`-feature`).
251255

252-
Currently, only one such feature is stable:
253-
- `lld`: toggles the usage of the lld linker, either the system-installed binary, or the self-contained
254-
`rust-lld` linker.
256+
Currently only one is stable, and only on the `x86_64-unknown-linux-gnu` target:
257+
- `lld`: to toggle using the lld linker, either the system-installed binary, or the self-contained
258+
`rust-lld` linker (via the `-Clink-self-contained=+linker` flag).
255259

256-
If you want to opt out of the usage of the `lld` linker (for targets where it is configured as the default linker),
257-
use `-Clinker-features=-lld`.
260+
For example, use:
261+
- `-Clinker-features=+lld` to opt in to using the `lld` linker
262+
- `-Clinker-features=-lld` to opt out instead, for targets where it is configured as the default linker
258263

259264
## linker-flavor
260265

src/doc/unstable-book/src/compiler-flags/linker-features.md

-35
This file was deleted.

0 commit comments

Comments
 (0)