@@ -12,75 +12,54 @@ This program is a compiler for the Rust language, available at
12
12
.SH OPTIONS
13
13
14
14
.TP
15
- \fB \-\- crate-name NAME \fR
16
- Specify the name of the crate being built
17
- .TP
18
- \fB \-\- crate-type=[bin|lib|dylib|rlib|staticlib] \fR
19
- Configure the flavor of rust crate that is generated (default `bin`)
15
+ \fB \- h \fR , \fB \-\- help \fR
16
+ Display the help message
20
17
.TP
21
18
\fB \-\- cfg \fR SPEC
22
19
Configure the compilation environment
23
20
.TP
24
- \fB \-\- emit=[asm,ir,bc,obj,link] \fR
25
- Configure the output that rustc will produce
26
- .TP
27
- \fB \- h \fR , \fB \-\- help \fR
28
- Display this message
29
- .TP
30
21
\fB \- L \fR PATH
31
22
Add a directory to the library search path
32
23
.TP
33
- \fB \-\- no \- trans \fR
34
- Run all passes except translation; no output
24
+ \fB \- l \fR NAME[:KIND]
25
+ Link the generated crate(s) to the specified native library NAME. The optional
26
+ KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
35
27
.TP
36
- \fB \-\- no \- analysis \fR
37
- Parse and expand the source, but run no analysis and produce no output
28
+ \fB \-\- crate-type \fR [bin|lib|rlib|dylib|staticlib]
29
+ Comma separated list of types of crates for the compiler to emit
38
30
.TP
39
- \fB \- g \fR
40
- Emit DWARF debug information into object files generated.
31
+ \fB \-\- crate-name NAME \fR
32
+ Specify the name of the crate being built
41
33
.TP
42
- \fB \-\- debuginfo \fR LEVEL
43
- Emit DWARF debug info to the objects created: 0 = no debug info, 1 =
44
- line-tables only (for stacktraces and breakpoints), 2 = full debug
45
- info with variable and type information (same as -g).
34
+ \fB \-\- emit \fR [asm|llvm-bc|llvm-ir|obj|link|dep-info]
35
+ Configure the output that rustc will produce
36
+ .TP
37
+ \fB \-\- print \fR [crate-name|output-file-names|sysroot]
38
+ Comma separated list of compiler information to print on stdout
39
+ .TP
40
+ \fB \- g \fR
41
+ Equivalent to \fI \- C \fR debuginfo=2
46
42
.TP
47
43
\fB \- O \fR
48
- Equivalent to \fI \-\- opt \ -level=2 \fR
44
+ Equivalent to \fI \- C \fR opt-level=2
49
45
.TP
50
46
\fB \- o \fR FILENAME
51
- Write output to <filename>. Ignored if more than one --emit is specified.
52
- .TP
53
- \fB \-\- opt \- level \fR LEVEL
54
- Optimize with possible levels 0-3
47
+ Write output to <filename>. Ignored if multiple \fI \-\- emit \fR outputs are
48
+ specified.
55
49
.TP
56
50
\fB \-\- out \- dir \fR DIR
57
- Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
58
- (default the current directory)
59
- .TP
60
- \fB \-\- parse \- only \fR
61
- Parse only; do not compile, assemble, or link
51
+ Write output to compiler-chosen filename in <dir>. Ignored if \fI \- o \fR is
52
+ specified. Defaults to the current directory.
62
53
.TP
63
- \fB \-\- pretty \fR [TYPE]
64
- Pretty-print the input instead of compiling; valid types are: normal
65
- (un-annotated source), expanded (crates expanded), typed (crates
66
- expanded, with type annotations), identified (fully parenthesized,
67
- AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
68
- formatted flowgraph for node)
69
- .TP
70
- \fB \-\- dep-info \fR [FILENAME]
71
- Output dependency info to <filename> after compiling, in a format suitable
72
- for use by Makefiles.
73
- .TP
74
- \fB \-\- sysroot \fR PATH
75
- Override the system root
54
+ \fB \-\- explain \fR OPT
55
+ Provide a detailed explanation of an error message
76
56
.TP
77
57
\fB \-\- test \fR
78
58
Build a test harness
79
59
.TP
80
60
\fB \-\- target \fR TRIPLE
81
- Target triple cpu-manufacturer-kernel[-os] to compile for (see
82
- http://sources.redhat.com/autobook/autobook/autobook_17.html
83
- for details)
61
+ Target triple cpu-manufacturer-kernel[-os] to compile for (see chapter 3.4 of
62
+ http://www.sourceware.org/autobook/ for details)
84
63
.TP
85
64
\fB \- W \fR help
86
65
Print 'lint' options and default settings
@@ -97,15 +76,30 @@ Set lint denied
97
76
\fB \- F \fR OPT, \fB \-\- forbid \fR OPT
98
77
Set lint forbidden
99
78
.TP
100
- \fB \- Z \fR FLAG
101
- Set internal debugging options. Use "-Z help" to print available options.
102
- .TP
103
79
\fB \- C \fR FLAG[=VAL], \fB \-\- codegen \fR FLAG[=VAL]
104
80
Set a codegen-related flag to the value specified. Use "-C help" to print
105
81
available flags. See CODEGEN OPTIONS below
106
82
.TP
107
- \fB \- v \fR , \fB \-\- version \fR
83
+ \fB \- V \fR , \fB \-\- version \fR
108
84
Print version info and exit
85
+ .TP
86
+ \fB \- v \fR , \fB \-\- verbose \fR
87
+ Use verbose output
88
+ .TP
89
+ \fB \-\- extern \fR NAME=PATH
90
+ Specify where an external rust library is located
91
+ .TP
92
+ \fB \-\- sysroot \fR PATH
93
+ Override the system root
94
+ .TP
95
+ \fB \- Z \fR FLAG
96
+ Set internal debugging options. Use "-Z help" to print available options.
97
+ .TP
98
+ \fB \-\- color \fR auto|always|never
99
+ Configure coloring of output:
100
+ auto = colorize, if output goes to a tty (default);
101
+ always = always colorize output;
102
+ never = never colorize output
109
103
110
104
.SH CODEGEN OPTIONS
111
105
@@ -121,6 +115,9 @@ objects.
121
115
A space-separated list of extra arguments to pass to the linker when the linker
122
116
is invoked.
123
117
.TP
118
+ \fB lto \fR
119
+ Perform LLVM link-time optimizations.
120
+ .TP
124
121
\fB target-cpu \fR =help
125
122
Selects a target processor. If the value is 'help', then a list of available
126
123
CPUs is printed.
@@ -167,8 +164,38 @@ Prefers dynamic linking to static linking.
167
164
\fB no-integrated-as \fR
168
165
Force usage of an external assembler rather than LLVM's integrated one.
169
166
.TP
167
+ \fB no-redzone \fR
168
+ Disable the use of the redzone.
169
+ .TP
170
170
\fB relocation-model \fR =[pic,static,dynamic-no-pic]
171
- The relocation model to use. (default: pic)
171
+ The relocation model to use. (Default: pic)
172
+ .TP
173
+ \fB code-model \fR =[small,kernel,medium,large]
174
+ Choose the code model to use.
175
+ .TP
176
+ \fB metadata \fR =val
177
+ Metadata to mangle symbol names with.
178
+ .TP
179
+ \fB extra-filename \fR =val
180
+ Extra data to put in each output filename.
181
+ .TP
182
+ \fB codegen-units \fR =val
183
+ Divide crate into N units to optimize in parallel.
184
+ .TP
185
+ \fB remark \fR =val
186
+ Print remarks for these optimization passes (space separated, or "all").
187
+ .TP
188
+ \fB no-stack-check \fR
189
+ Disable checks for stack exhaustion (a memory-safety hazard!).
190
+ .TP
191
+ \fB debuginfo \fR =val
192
+ Debug info emission level:
193
+ 0 = no debug info;
194
+ 1 = line-tables only (for stacktraces and breakpoints);
195
+ 2 = full debug info with variable and type information.
196
+ .TP
197
+ \fB opt-level \fR =val
198
+ Optimize with possible levels 0-3
172
199
173
200
.SH "EXAMPLES"
174
201
To build an executable from a source file with a main function:
0 commit comments