@@ -7,32 +7,6 @@ a version of this list for your exact compiler by running `rustc -C help`.
77
88This option is deprecated and does nothing.
99
10- ## bitcode-in-rlib
11-
12- This flag controls whether or not the compiler puts LLVM bitcode into generated
13- rlibs. It takes one of the following values:
14-
15- * ` y ` , ` yes ` , ` on ` , or no value: put bitcode in rlibs (the default).
16- * ` n ` , ` no ` , or ` off ` : omit bitcode from rlibs.
17-
18- LLVM bitcode is only needed when link-time optimization (LTO) is being
19- performed, but it is enabled by default for backwards compatibility reasons.
20-
21- The use of ` -C bitcode-in-rlib=no ` can significantly improve compile times and
22- reduce generated file sizes. For these reasons, Cargo uses `-C
23- bitcode-in-rlib=no` whenever possible. Likewise, if you are building directly
24- with ` rustc ` we recommend using ` -C bitcode-in-rlib=no ` whenever you are not
25- using LTO.
26-
27- If combined with ` -C lto ` , ` -C bitcode-in-rlib=no ` will cause ` rustc ` to abort
28- at start-up, because the combination is invalid.
29-
30- > ** Note** : the implementation of this flag today is to enable the
31- > ` -Zembed-bitcode ` option. When bitcode is embedded into an rlib then all
32- > object files within the rlib will have a special section (typically named
33- > ` .llvmbc ` , depends on the platform though) which contains LLVM bytecode. This
34- > section of the object file will not appear in the final linked artifact.
35-
3610## code-model
3711
3812This option lets you choose which code model to use.
@@ -86,6 +60,26 @@ It takes one of the following values:
8660For example, for gcc flavor linkers, this issues the ` -nodefaultlibs ` flag to
8761the linker.
8862
63+ ## embed-bitcode
64+
65+ This flag controls whether or not the compiler puts LLVM bitcode into generated
66+ rlibs. It takes one of the following values:
67+
68+ * ` y ` , ` yes ` , ` on ` , or no value: put bitcode in rlibs (the default).
69+ * ` n ` , ` no ` , or ` off ` : omit bitcode from rlibs.
70+
71+ LLVM bitcode is only needed when link-time optimization (LTO) is being
72+ performed, but it is enabled by default for backwards compatibility reasons.
73+
74+ The use of ` -C embed-bitcode=no ` can significantly improve compile times and
75+ reduce generated file sizes. For these reasons, Cargo uses `-C
76+ embed-bitcode=no` whenever possible. Likewise, if you are building directly
77+ with ` rustc ` we recommend using ` -C embed-bitcode=no ` whenever you are not
78+ using LTO.
79+
80+ If combined with ` -C lto ` , ` -C embed-bitcode=no ` will cause ` rustc ` to abort
81+ at start-up, because the combination is invalid.
82+
8983## extra-filename
9084
9185This option allows you to put extra data in each output filename. It takes a
@@ -355,21 +349,21 @@ Supported values for this option are:
355349- ` static ` - non-relocatable code, machine instructions may use absolute addressing modes.
356350
357351- ` pic ` - fully relocatable position independent code,
358- machine instructions need to use relative addressing modes.
352+ machine instructions need to use relative addressing modes. \
359353Equivalent to the "uppercase" ` -fPIC ` or ` -fPIE ` options in other compilers,
360- depending on the produced crate types.
354+ depending on the produced crate types. \
361355This is the default model for majority of supported targets.
362356
363357#### Special relocation models
364358
365- - ` dynamic-no-pic ` - relocatable external references, non-relocatable code.
366- Only makes sense on Darwin and is rarely used.
359+ - ` dynamic-no-pic ` - relocatable external references, non-relocatable code. \
360+ Only makes sense on Darwin and is rarely used. \
367361If StackOverflow tells you to use this as an opt-out of PIC or PIE, don't believe it,
368362use ` -C relocation-model=static ` instead.
369363- ` ropi ` , ` rwpi ` and ` ropi-rwpi ` - relocatable code and read-only data, relocatable read-write data,
370- and combination of both, respectively.
364+ and combination of both, respectively. \
371365Only makes sense for certain embedded ARM targets.
372- - ` default ` - relocation model default to the current target.
366+ - ` default ` - relocation model default to the current target. \
373367Only makes sense as an override for some other explicitly specified relocation model
374368previously set on the command line.
375369
@@ -380,7 +374,7 @@ Supported values can also be discovered by running `rustc --print relocation-mod
380374In addition to codegen effects, ` relocation-model ` has effects during linking.
381375
382376If the relocation model is ` pic ` and the current target supports position-independent executables
383- (PIE), the linker will be instructed (` -pie ` ) to produce one.
377+ (PIE), the linker will be instructed (` -pie ` ) to produce one. \
384378If the target doesn't support both position-independent and statically linked executables,
385379then ` -C target-feature=+crt-static ` "wins" over ` -C relocation-model=pic ` ,
386380and the linker is instructed (` -static ` ) to produce a statically linked
0 commit comments