File tree 2 files changed +11
-41
lines changed
rustc/src/codegen-options
unstable-book/src/compiler-flags
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.
244
244
245
245
## linker-features
246
246
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.
248
252
249
253
The flag accepts a comma-separated list of features, individually enabled (` +feature ` ) or disabled
250
254
(` -feature ` ).
251
255
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) .
255
259
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
258
263
259
264
## linker-flavor
260
265
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments