This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-41
lines changed
rustc/src/codegen-options
unstable-book/src/compiler-flags Expand file tree Collapse file tree 2 files changed +11
-41
lines changed Original file line number Diff line number Diff 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
249253The 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
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments