@@ -7,267 +7,224 @@ rustc \- The Rust compiler
7
7
8
8
.SH DESCRIPTION
9
9
This program is a compiler for the Rust language, available at
10
- .UR https://www.rust\- lang.org
11
- .UE .
10
+ <\fB https://www.rust-lang.org \fR >.
12
11
13
12
.SH OPTIONS
14
13
15
14
.TP
16
15
\fB \- h \fR , \fB \-\- help \fR
17
- Display the help message.
16
+ Display the help message
18
17
.TP
19
- \fB \-\- cfg \fR \fI SPEC \fR
20
- Configure the compilation environment.
18
+ \fB \-\- cfg \fR SPEC
19
+ Configure the compilation environment
21
20
.TP
22
- \fB \- L \fR [\fI KIND \fR =]\fI PATH \fR
23
- Add a directory to the library search path.
24
- The optional \fI KIND \fR can be one of:
25
- .RS
21
+ \fB \- L \fR [KIND=]PATH
22
+ Add a directory to the library search path. The optional KIND can be one of:
23
+ dependency = only lookup transitive dependencies here
24
+ crate = only lookup local `extern crate` directives here
25
+ native = only lookup native libraries here
26
+ framework = only look for OSX frameworks here
27
+ all = look for anything here (the default)
26
28
.TP
27
- \fB dependency \fR
28
- only lookup transitive dependencies here
29
+ \fB \- l \fR [KIND=]NAME
30
+ Link the generated crate(s) to the specified native library NAME. The optional
31
+ KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
29
32
.TP
30
- . B crate
31
- only lookup local `extern crate` directives here
33
+ \fB \-\- crate-type \fR [bin|lib|rlib|dylib|staticlib]
34
+ Comma separated list of types of crates for the compiler to emit
32
35
.TP
33
- . B native
34
- only lookup native libraries here
36
+ \fB \-\- crate-name NAME \fR
37
+ Specify the name of the crate being built
35
38
.TP
36
- . B framework
37
- only look for OSX frameworks here
39
+ \fB \-\- emit \fR [asm|llvm-bc|llvm-ir|obj|link|dep-info]
40
+ Configure the output that rustc will produce
38
41
.TP
39
- .B all
40
- look for anything here (the default)
41
- .RE
42
- .TP
43
- \fB \- l \fR [\fI KIND \fR =]\fI NAME \fR
44
- Link the generated crate(s) to the specified native library \fI NAME \fR .
45
- The optional \fI KIND \fR can be one of \fI static \fR , \fI dylib \fR , or
46
- \fI framework \fR .
47
- If omitted, \fI dylib \fR is assumed.
48
- .TP
49
- \fB \-\- crate \- type \fR [bin|lib|rlib|dylib|staticlib]
50
- Comma separated list of types of crates for the compiler to emit.
51
- .TP
52
- \fB \-\- crate \- name \fR \fI NAME \fR
53
- Specify the name of the crate being built.
54
- .TP
55
- \fB \-\- emit \fR [asm|llvm\- bc|llvm\- ir|obj|link|dep\- info]
56
- Configure the output that \fB rustc \fR will produce.
57
- .TP
58
- \fB \-\- print \fR [crate\- name|file\- names|sysroot]
59
- Comma separated list of compiler information to print on stdout.
42
+ \fB \-\- print \fR [crate-name|file-names|sysroot]
43
+ Comma separated list of compiler information to print on stdout
60
44
.TP
61
45
\fB \- g \fR
62
- Equivalent to \fI \- C \ debuginfo=2 \fR .
46
+ Equivalent to \fI \- C \fR debuginfo=2
63
47
.TP
64
48
\fB \- O \fR
65
- Equivalent to \fI \- C \ opt \ -level=2 \fR .
49
+ Equivalent to \fI \- C \fR opt-level=2
66
50
.TP
67
- \fB \- o \fR \fI FILENAME \fR
68
- Write output to \fI FILENAME \fR .
69
- Ignored if multiple \fI \-\- emit \fR outputs are specified.
51
+ \fB \- o \fR FILENAME
52
+ Write output to <filename>. Ignored if multiple \fI \-\- emit \fR outputs are
53
+ specified.
70
54
.TP
71
- \fB \-\- out \- dir \fR \fI DIR \fR
72
- Write output to compiler\[hy ] chosen filename in \fI DIR \fR .
73
- Ignored if \fI \- o \fR is specified.
74
- Defaults to the current directory.
55
+ \fB \-\- out \- dir \fR DIR
56
+ Write output to compiler-chosen filename in <dir>. Ignored if \fI \- o \fR is
57
+ specified. Defaults to the current directory.
75
58
.TP
76
- \fB \-\- explain \fR \fI OPT \fR
77
- Provide a detailed explanation of an error message.
59
+ \fB \-\- explain \fR OPT
60
+ Provide a detailed explanation of an error message
78
61
.TP
79
62
\fB \-\- test \fR
80
- Build a test harness.
63
+ Build a test harness
81
64
.TP
82
- \fB \-\- target \fR \fI TRIPLE \fR
83
- Target triple \fI cpu \fR \- \fI manufacturer \fR \- \fI kernel \fR [\- \fI os \fR ]
84
- to compile for (see chapter 3.4 of
85
- .UR http://www.sourceware.org/autobook/
86
- .UE
87
- for details).
65
+ \fB \-\- target \fR TRIPLE
66
+ Target triple cpu-manufacturer-kernel[-os] to compile for (see chapter 3.4 of
67
+ http://www.sourceware.org/autobook/ for details)
88
68
.TP
89
- \fB \- W help \fR
90
- Print 'lint' options and default settings.
69
+ \fB \- W \fR help
70
+ Print 'lint' options and default settings
91
71
.TP
92
- \fB \- W \fR \fI OPT \fR , \fB \-\- warn \fR \fI OPT \fR
93
- Set lint warnings.
72
+ \fB \- W \fR OPT , \fB \-\- warn \fR OPT
73
+ Set lint warnings
94
74
.TP
95
- \fB \- A \fR \fI OPT \fR , \fB \-\- allow \fR \fI OPT \fR
96
- Set lint allowed.
75
+ \fB \- A \fR OPT , \fB \-\- allow \fR OPT
76
+ Set lint allowed
97
77
.TP
98
- \fB \- D \fR \fI OPT \fR , \fB \-\- deny \fR \fI OPT \fR
99
- Set lint denied.
78
+ \fB \- D \fR OPT , \fB \-\- deny \fR OPT
79
+ Set lint denied
100
80
.TP
101
- \fB \- F \fR \fI OPT \fR , \fB \-\- forbid \fR \fI OPT \fR
102
- Set lint forbidden.
81
+ \fB \- F \fR OPT , \fB \-\- forbid \fR OPT
82
+ Set lint forbidden
103
83
.TP
104
- \fB \- C \fR \fI FLAG \fR [=\fI VAL \fR ], \fB \-\- codegen \fR \fI FLAG \fR [=\fI VAL \fR ]
105
- Set a codegen\[hy ] related flag to the value specified.
106
- Use \fI \- C help \fR to print available flags.
107
- See CODEGEN OPTIONS below.
84
+ \fB \- C \fR FLAG[=VAL], \fB \-\- codegen \fR FLAG[=VAL]
85
+ Set a codegen-related flag to the value specified. Use "-C help" to print
86
+ available flags. See CODEGEN OPTIONS below
108
87
.TP
109
88
\fB \- V \fR , \fB \-\- version \fR
110
- Print version info and exit.
89
+ Print version info and exit
111
90
.TP
112
91
\fB \- v \fR , \fB \-\- verbose \fR
113
- Use verbose output.
92
+ Use verbose output
114
93
.TP
115
- \fB \-\- extern \fR \fI NAME \fR = \fI PATH \fR
116
- Specify where an external rust library is located.
94
+ \fB \-\- extern \fR NAME=PATH
95
+ Specify where an external rust library is located
117
96
.TP
118
- \fB \-\- sysroot \fR \fI PATH \fR
119
- Override the system root.
97
+ \fB \-\- sysroot \fR PATH
98
+ Override the system root
120
99
.TP
121
- \fB \- Z \fR \fI FLAG \fR
122
- Set internal debugging options.
123
- Use \fI \- Z help \fR to print available options.
100
+ \fB \- Z \fR FLAG
101
+ Set internal debugging options. Use "-Z help" to print available options.
124
102
.TP
125
103
\fB \-\- color \fR auto|always|never
126
104
Configure coloring of output:
127
- .RS
128
- .TP
129
- .B auto
130
- colorize, if output goes to a tty (default);
131
- .TP
132
- .B always
133
- always colorize output;
134
- .TP
135
- .B never
136
- never colorize output.
137
- .RE
105
+ auto = colorize, if output goes to a tty (default);
106
+ always = always colorize output;
107
+ never = never colorize output
138
108
139
109
.SH CODEGEN OPTIONS
140
110
141
111
.TP
142
- \fB ar \fR =\fI /path/to/ar \fR
112
+ \fB ar \fR =/path/to/ar
143
113
Path to the archive utility to use when assembling archives.
144
114
.TP
145
- \fB linker \fR =\fI /path/to/cc \fR
115
+ \fB linker \fR =/path/to/cc
146
116
Path to the linker utility to use when linking libraries, executables, and
147
117
objects.
148
118
.TP
149
- \fB link \ -args \fR ='\fI \ -flag1 \ -flag2 \fR '
150
- A space\[ hy ] separated list of extra arguments to pass to the linker when the linker
119
+ \fB link-args \fR ='-flag1 -flag2'
120
+ A space- separated list of extra arguments to pass to the linker when the linker
151
121
is invoked.
152
122
.TP
153
123
\fB lto \fR
154
- Perform LLVM link\[ hy ] time optimizations.
124
+ Perform LLVM link- time optimizations.
155
125
.TP
156
- \fB target \ -cpu \fR =\fI help \fR
157
- Selects a target processor.
158
- If the value is 'help', then a list of available CPUs is printed.
126
+ \fB target-cpu \fR =help
127
+ Selects a target processor. If the value is 'help', then a list of available
128
+ CPUs is printed.
159
129
.TP
160
- \fB target \ -feature \fR ='\fI +feature1 \fR , \fI \ -feature2 \fR '
161
- A comma\[ hy ] separated list of features to enable or disable for the target.
162
- A preceding '+' enables a feature while a preceding '\ - ' disables it.
163
- Available features can be discovered through \fI target \ -cpu=help \fR .
130
+ \fB target-feature \fR ='+feature1, -feature2'
131
+ A comma- separated list of features to enable or disable for the target. A
132
+ preceding '+' enables a feature while a preceding '-' disables it. Available
133
+ features can be discovered through target -cpu=help.
164
134
.TP
165
- \fB passes \fR =\fI val \fR
166
- A space\[hy ] separated list of extra LLVM passes to run.
167
- A value of 'list' will cause \fB rustc \fR to print all known passes and
168
- exit.
169
- The passes specified are appended at the end of the normal pass manager.
135
+ \fB passes \fR =list
136
+ A space-separated list of extra LLVM passes to run. A value of 'list' will
137
+ cause rustc to print all known passes and exit. The passes specified are
138
+ appended at the end of the normal pass manager.
170
139
.TP
171
- \fB llvm \ -args \fR ='\fI \ -arg1 \fR \fI \ -arg2 \fR '
172
- A space\[ hy ] separated list of arguments to pass through to LLVM.
140
+ \fB llvm-args \fR ='-arg1 -arg2'
141
+ A space- separated list of arguments to pass through to LLVM.
173
142
.TP
174
- \fB save \ -temps \fR
175
- If specified, the compiler will save more files (.bc, .o, .no\ - opt.bc) generated
143
+ \fB save-temps \fR
144
+ If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
176
145
throughout compilation in the output directory.
177
146
.TP
178
147
\fB rpath \fR
179
148
If specified, then the rpath value for dynamic libraries will be set in
180
149
either dynamic library or executable outputs.
181
150
.TP
182
- \fB no \ -prepopulate \ -passes \fR
183
- Suppresses pre\[ hy ] population of the LLVM pass manager that is run over the module.
151
+ \fB no-prepopulate-passes \fR
152
+ Suppresses pre- population of the LLVM pass manager that is run over the module.
184
153
.TP
185
- \fB no \ -vectorize \ -loops \fR
154
+ \fB no-vectorize-loops \fR
186
155
Suppresses running the loop vectorization LLVM pass, regardless of optimization
187
156
level.
188
157
.TP
189
- \fB no \ -vectorize \ -slp \fR
158
+ \fB no-vectorize-slp \fR
190
159
Suppresses running the LLVM SLP vectorization pass, regardless of optimization
191
160
level.
192
161
.TP
193
- \fB soft \ -float \fR
162
+ \fB soft-float \fR
194
163
Generates software floating point library calls instead of hardware
195
164
instructions.
196
165
.TP
197
- \fB prefer \ -dynamic \fR
166
+ \fB prefer-dynamic \fR
198
167
Prefers dynamic linking to static linking.
199
168
.TP
200
- \fB no \ -integrated \ -as \fR
169
+ \fB no-integrated-as \fR
201
170
Force usage of an external assembler rather than LLVM's integrated one.
202
171
.TP
203
- \fB no \ -redzone \fR
172
+ \fB no-redzone \fR
204
173
Disable the use of the redzone.
205
174
.TP
206
- \fB relocation \- model \fR =[pic,static,dynamic\- no\- pic]
207
- The relocation model to use.
208
- (Default: \fI pic \fR )
175
+ \fB relocation-model \fR =[pic,static,dynamic-no-pic]
176
+ The relocation model to use. (Default: pic)
209
177
.TP
210
- \fB code \ -model \fR =[small,kernel,medium,large]
178
+ \fB code-model \fR =[small,kernel,medium,large]
211
179
Choose the code model to use.
212
180
.TP
213
- \fB metadata \fR =\fI val \fR
181
+ \fB metadata \fR =val
214
182
Metadata to mangle symbol names with.
215
183
.TP
216
- \fB extra \ -filename \fR =\fI val \fR
184
+ \fB extra-filename \fR =val
217
185
Extra data to put in each output filename.
218
186
.TP
219
- \fB codegen \ -units \fR =\fI n \fR
220
- Divide crate into \fI n \fR units to optimize in parallel.
187
+ \fB codegen-units \fR =val
188
+ Divide crate into N units to optimize in parallel.
221
189
.TP
222
- \fB remark \fR =\fI val \fR
190
+ \fB remark \fR =val
223
191
Print remarks for these optimization passes (space separated, or "all").
224
192
.TP
225
- \fB no \ -stack \ -check \fR
226
- Disable checks for stack exhaustion (a memory\[ hy ] safety hazard!).
193
+ \fB no-stack-check \fR
194
+ Disable checks for stack exhaustion (a memory- safety hazard!).
227
195
.TP
228
- \fB debuginfo \fR =\fI val \fR
196
+ \fB debuginfo \fR =val
229
197
Debug info emission level:
230
- .RS
231
- .TP
232
- .B 0
233
- no debug info;
234
- .TP
235
- .B 1
236
- line\[hy ] tables only (for stacktraces and breakpoints);
237
- .TP
238
- .B 2
239
- full debug info with variable and type information.
240
- .RE
198
+ 0 = no debug info;
199
+ 1 = line-tables only (for stacktraces and breakpoints);
200
+ 2 = full debug info with variable and type information.
241
201
.TP
242
- \fB opt \ -level \fR =\fI VAL \fR
243
- Optimize with possible levels 0\[ en ] 3
202
+ \fB opt-level \fR =val
203
+ Optimize with possible levels 0- 3
244
204
245
205
.SH "EXAMPLES"
246
206
To build an executable from a source file with a main function:
247
- $ rustc \ - o hello hello.rs
207
+ $ rustc -o hello hello.rs
248
208
249
209
To build a library from a source file:
250
- $ rustc \-\ - crate\ - type=lib hello\ - lib.rs
210
+ $ rustc - -crate-type=lib hello-lib.rs
251
211
252
212
To build either with a crate (.rs) file:
253
213
$ rustc hello.rs
254
214
255
215
To build an executable with debug info:
256
- $ rustc \ - g \ - o hello hello.rs
216
+ $ rustc -g -o hello hello.rs
257
217
258
218
.SH "SEE ALSO"
259
219
260
- . BR rustdoc (1)
220
+ rustdoc
261
221
262
222
.SH "BUGS"
263
- See
264
- .UR https://github.com/rust\- lang/rust/issues
265
- .UE
266
- for issues.
223
+ See <\fB https://github.com/rust-lang/rust/issues \fR > for issues.
267
224
268
225
.SH "AUTHOR"
269
- See \fI AUTHORS .txt\fR in the Rust source distribution.
226
+ See \fB AUTHORS .txt\fR in the Rust source distribution.
270
227
271
228
.SH "COPYRIGHT"
272
- This work is dual\[ hy ] licensed under Apache\ 2.0 and MIT terms.
273
- See \fI COPYRIGHT \fR file in the rust source distribution.
229
+ This work is dual- licensed under Apache 2.0 and MIT terms. See \fB COPYRIGHT \fR
230
+ file in the rust source distribution.
0 commit comments