@@ -7,32 +7,6 @@ a version of this list for your exact compiler by running `rustc -C help`.
7
7
8
8
This option is deprecated and does nothing.
9
9
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
-
36
10
## code-model
37
11
38
12
This option lets you choose which code model to use.
@@ -86,6 +60,26 @@ It takes one of the following values:
86
60
For example, for gcc flavor linkers, this issues the ` -nodefaultlibs ` flag to
87
61
the linker.
88
62
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
+
89
83
## extra-filename
90
84
91
85
This option allows you to put extra data in each output filename. It takes a
@@ -355,21 +349,21 @@ Supported values for this option are:
355
349
- ` static ` - non-relocatable code, machine instructions may use absolute addressing modes.
356
350
357
351
- ` pic ` - fully relocatable position independent code,
358
- machine instructions need to use relative addressing modes.
352
+ machine instructions need to use relative addressing modes. \
359
353
Equivalent to the "uppercase" ` -fPIC ` or ` -fPIE ` options in other compilers,
360
- depending on the produced crate types.
354
+ depending on the produced crate types. \
361
355
This is the default model for majority of supported targets.
362
356
363
357
#### Special relocation models
364
358
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. \
367
361
If StackOverflow tells you to use this as an opt-out of PIC or PIE, don't believe it,
368
362
use ` -C relocation-model=static ` instead.
369
363
- ` 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. \
371
365
Only 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. \
373
367
Only makes sense as an override for some other explicitly specified relocation model
374
368
previously set on the command line.
375
369
@@ -380,7 +374,7 @@ Supported values can also be discovered by running `rustc --print relocation-mod
380
374
In addition to codegen effects, ` relocation-model ` has effects during linking.
381
375
382
376
If 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. \
384
378
If the target doesn't support both position-independent and statically linked executables,
385
379
then ` -C target-feature=+crt-static ` "wins" over ` -C relocation-model=pic ` ,
386
380
and the linker is instructed (` -static ` ) to produce a statically linked
0 commit comments