Skip to content

Commit 5f47c06

Browse files
committed
Auto merge of #23248 - Manishearth:rollup, r=Manishearth
2 parents d3c49d2 + b0357ac commit 5f47c06

18 files changed

+570
-198
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,8 @@ probe CFG_ADB adb
701701

702702
if [ ! -z "$CFG_PANDOC" ]
703703
then
704+
# Extract "MAJOR MINOR" from Pandoc's version number
704705
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
705-
# Extract "MAJOR MINOR" from Pandoc's version number
706706
sed -E 's/pandoc(.exe)? ([0-9]+)\.([0-9]+).*/\2 \3/')
707707

708708
MIN_PV_MAJOR="1"

man/rustc.1

Lines changed: 155 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -7,224 +7,267 @@ rustc \- The Rust compiler
77

88
.SH DESCRIPTION
99
This program is a compiler for the Rust language, available at
10-
<\fBhttps://www.rust-lang.org\fR>.
10+
.UR https://www.rust\-lang.org
11+
.UE .
1112

1213
.SH OPTIONS
1314

1415
.TP
1516
\fB\-h\fR, \fB\-\-help\fR
16-
Display the help message
17+
Display the help message.
1718
.TP
18-
\fB\-\-cfg\fR SPEC
19-
Configure the compilation environment
19+
\fB\-\-cfg\fR \fISPEC\fR
20+
Configure the compilation environment.
2021
.TP
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)
22+
\fB\-L\fR [\fIKIND\fR=]\fIPATH\fR
23+
Add a directory to the library search path.
24+
The optional \fIKIND\fR can be one of:
25+
.RS
2826
.TP
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.
27+
\fBdependency\fR
28+
only lookup transitive dependencies here
3229
.TP
33-
\fB\-\-crate-type\fR [bin|lib|rlib|dylib|staticlib]
34-
Comma separated list of types of crates for the compiler to emit
30+
.B crate
31+
only lookup local `extern crate` directives here
3532
.TP
36-
\fB\-\-crate-name NAME\fR
37-
Specify the name of the crate being built
33+
.B native
34+
only lookup native libraries here
3835
.TP
39-
\fB\-\-emit\fR [asm|llvm-bc|llvm-ir|obj|link|dep-info]
40-
Configure the output that rustc will produce
36+
.B framework
37+
only look for OSX frameworks here
4138
.TP
42-
\fB\-\-print\fR [crate-name|file-names|sysroot]
43-
Comma separated list of compiler information to print on stdout
39+
.B all
40+
look for anything here (the default)
41+
.RE
42+
.TP
43+
\fB\-l\fR [\fIKIND\fR=]\fINAME\fR
44+
Link the generated crate(s) to the specified native library \fINAME\fR.
45+
The optional \fIKIND\fR can be one of \fIstatic\fR, \fIdylib\fR, or
46+
\fIframework\fR.
47+
If omitted, \fIdylib\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 \fINAME\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 \fBrustc\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.
4460
.TP
4561
\fB\-g\fR
46-
Equivalent to \fI\-C\fR debuginfo=2
62+
Equivalent to \fI\-C\ debuginfo=2\fR.
4763
.TP
4864
\fB\-O\fR
49-
Equivalent to \fI\-C\fR opt-level=2
65+
Equivalent to \fI\-C\ opt\-level=2\fR.
5066
.TP
51-
\fB\-o\fR FILENAME
52-
Write output to <filename>. Ignored if multiple \fI\-\-emit\fR outputs are
53-
specified.
67+
\fB\-o\fR \fIFILENAME\fR
68+
Write output to \fIFILENAME\fR.
69+
Ignored if multiple \fI\-\-emit\fR outputs are specified.
5470
.TP
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.
71+
\fB\-\-out\-dir\fR \fIDIR\fR
72+
Write output to compiler\[hy]chosen filename in \fIDIR\fR.
73+
Ignored if \fI\-o\fR is specified.
74+
Defaults to the current directory.
5875
.TP
59-
\fB\-\-explain\fR OPT
60-
Provide a detailed explanation of an error message
76+
\fB\-\-explain\fR \fIOPT\fR
77+
Provide a detailed explanation of an error message.
6178
.TP
6279
\fB\-\-test\fR
63-
Build a test harness
80+
Build a test harness.
6481
.TP
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)
82+
\fB\-\-target\fR \fITRIPLE\fR
83+
Target triple \fIcpu\fR\-\fImanufacturer\fR\-\fIkernel\fR[\-\fIos\fR]
84+
to compile for (see chapter 3.4 of
85+
.UR http://www.sourceware.org/autobook/
86+
.UE
87+
for details).
6888
.TP
69-
\fB\-W\fR help
70-
Print 'lint' options and default settings
89+
\fB\-W help\fR
90+
Print 'lint' options and default settings.
7191
.TP
72-
\fB\-W\fR OPT, \fB\-\-warn\fR OPT
73-
Set lint warnings
92+
\fB\-W\fR \fIOPT\fR, \fB\-\-warn\fR \fIOPT\fR
93+
Set lint warnings.
7494
.TP
75-
\fB\-A\fR OPT, \fB\-\-allow\fR OPT
76-
Set lint allowed
95+
\fB\-A\fR \fIOPT\fR, \fB\-\-allow\fR \fIOPT\fR
96+
Set lint allowed.
7797
.TP
78-
\fB\-D\fR OPT, \fB\-\-deny\fR OPT
79-
Set lint denied
98+
\fB\-D\fR \fIOPT\fR, \fB\-\-deny\fR \fIOPT\fR
99+
Set lint denied.
80100
.TP
81-
\fB\-F\fR OPT, \fB\-\-forbid\fR OPT
82-
Set lint forbidden
101+
\fB\-F\fR \fIOPT\fR, \fB\-\-forbid\fR \fIOPT\fR
102+
Set lint forbidden.
83103
.TP
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
104+
\fB\-C\fR \fIFLAG\fR[=\fIVAL\fR], \fB\-\-codegen\fR \fIFLAG\fR[=\fIVAL\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.
87108
.TP
88109
\fB\-V\fR, \fB\-\-version\fR
89-
Print version info and exit
110+
Print version info and exit.
90111
.TP
91112
\fB\-v\fR, \fB\-\-verbose\fR
92-
Use verbose output
113+
Use verbose output.
93114
.TP
94-
\fB\-\-extern\fR NAME=PATH
95-
Specify where an external rust library is located
115+
\fB\-\-extern\fR \fINAME\fR=\fIPATH\fR
116+
Specify where an external rust library is located.
96117
.TP
97-
\fB\-\-sysroot\fR PATH
98-
Override the system root
118+
\fB\-\-sysroot\fR \fIPATH\fR
119+
Override the system root.
99120
.TP
100-
\fB\-Z\fR FLAG
101-
Set internal debugging options. Use "-Z help" to print available options.
121+
\fB\-Z\fR \fIFLAG\fR
122+
Set internal debugging options.
123+
Use \fI\-Z help\fR to print available options.
102124
.TP
103125
\fB\-\-color\fR auto|always|never
104126
Configure coloring of output:
105-
auto = colorize, if output goes to a tty (default);
106-
always = always colorize output;
107-
never = never colorize 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
108138

109139
.SH CODEGEN OPTIONS
110140

111141
.TP
112-
\fBar\fR=/path/to/ar
142+
\fBar\fR=\fI/path/to/ar\fR
113143
Path to the archive utility to use when assembling archives.
114144
.TP
115-
\fBlinker\fR=/path/to/cc
145+
\fBlinker\fR=\fI/path/to/cc\fR
116146
Path to the linker utility to use when linking libraries, executables, and
117147
objects.
118148
.TP
119-
\fBlink-args\fR='-flag1 -flag2'
120-
A space-separated list of extra arguments to pass to the linker when the linker
149+
\fBlink\-args\fR='\fI\-flag1 \-flag2\fR'
150+
A space\[hy]separated list of extra arguments to pass to the linker when the linker
121151
is invoked.
122152
.TP
123153
\fBlto\fR
124-
Perform LLVM link-time optimizations.
154+
Perform LLVM link\[hy]time optimizations.
125155
.TP
126-
\fBtarget-cpu\fR=help
127-
Selects a target processor. If the value is 'help', then a list of available
128-
CPUs is printed.
156+
\fBtarget\-cpu\fR=\fIhelp\fR
157+
Selects a target processor.
158+
If the value is 'help', then a list of available CPUs is printed.
129159
.TP
130-
\fBtarget-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.
160+
\fBtarget\-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 \fItarget\-cpu=help\fR.
134164
.TP
135-
\fBpasses\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.
165+
\fBpasses\fR=\fIval\fR
166+
A space\[hy]separated list of extra LLVM passes to run.
167+
A value of 'list' will cause \fBrustc\fR to print all known passes and
168+
exit.
169+
The passes specified are appended at the end of the normal pass manager.
139170
.TP
140-
\fBllvm-args\fR='-arg1 -arg2'
141-
A space-separated list of arguments to pass through to LLVM.
171+
\fBllvm\-args\fR='\fI\-arg1\fR \fI\-arg2\fR'
172+
A space\[hy]separated list of arguments to pass through to LLVM.
142173
.TP
143-
\fBsave-temps\fR
144-
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
174+
\fBsave\-temps\fR
175+
If specified, the compiler will save more files (.bc, .o, .no\-opt.bc) generated
145176
throughout compilation in the output directory.
146177
.TP
147178
\fBrpath\fR
148179
If specified, then the rpath value for dynamic libraries will be set in
149180
either dynamic library or executable outputs.
150181
.TP
151-
\fBno-prepopulate-passes\fR
152-
Suppresses pre-population of the LLVM pass manager that is run over the module.
182+
\fBno\-prepopulate\-passes\fR
183+
Suppresses pre\[hy]population of the LLVM pass manager that is run over the module.
153184
.TP
154-
\fBno-vectorize-loops\fR
185+
\fBno\-vectorize\-loops\fR
155186
Suppresses running the loop vectorization LLVM pass, regardless of optimization
156187
level.
157188
.TP
158-
\fBno-vectorize-slp\fR
189+
\fBno\-vectorize\-slp\fR
159190
Suppresses running the LLVM SLP vectorization pass, regardless of optimization
160191
level.
161192
.TP
162-
\fBsoft-float\fR
193+
\fBsoft\-float\fR
163194
Generates software floating point library calls instead of hardware
164195
instructions.
165196
.TP
166-
\fBprefer-dynamic\fR
197+
\fBprefer\-dynamic\fR
167198
Prefers dynamic linking to static linking.
168199
.TP
169-
\fBno-integrated-as\fR
200+
\fBno\-integrated\-as\fR
170201
Force usage of an external assembler rather than LLVM's integrated one.
171202
.TP
172-
\fBno-redzone\fR
203+
\fBno\-redzone\fR
173204
Disable the use of the redzone.
174205
.TP
175-
\fBrelocation-model\fR=[pic,static,dynamic-no-pic]
176-
The relocation model to use. (Default: pic)
206+
\fBrelocation\-model\fR=[pic,static,dynamic\-no\-pic]
207+
The relocation model to use.
208+
(Default: \fIpic\fR)
177209
.TP
178-
\fBcode-model\fR=[small,kernel,medium,large]
210+
\fBcode\-model\fR=[small,kernel,medium,large]
179211
Choose the code model to use.
180212
.TP
181-
\fBmetadata\fR=val
213+
\fBmetadata\fR=\fIval\fR
182214
Metadata to mangle symbol names with.
183215
.TP
184-
\fBextra-filename\fR=val
216+
\fBextra\-filename\fR=\fIval\fR
185217
Extra data to put in each output filename.
186218
.TP
187-
\fBcodegen-units\fR=val
188-
Divide crate into N units to optimize in parallel.
219+
\fBcodegen\-units\fR=\fIn\fR
220+
Divide crate into \fIn\fR units to optimize in parallel.
189221
.TP
190-
\fBremark\fR=val
222+
\fBremark\fR=\fIval\fR
191223
Print remarks for these optimization passes (space separated, or "all").
192224
.TP
193-
\fBno-stack-check\fR
194-
Disable checks for stack exhaustion (a memory-safety hazard!).
225+
\fBno\-stack\-check\fR
226+
Disable checks for stack exhaustion (a memory\[hy]safety hazard!).
195227
.TP
196-
\fBdebuginfo\fR=val
228+
\fBdebuginfo\fR=\fIval\fR
197229
Debug info emission level:
198-
0 = no debug info;
199-
1 = line-tables only (for stacktraces and breakpoints);
200-
2 = full debug info with variable and type information.
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
201241
.TP
202-
\fBopt-level\fR=val
203-
Optimize with possible levels 0-3
242+
\fBopt\-level\fR=\fIVAL\fR
243+
Optimize with possible levels 0\[en]3
204244

205245
.SH "EXAMPLES"
206246
To build an executable from a source file with a main function:
207-
$ rustc -o hello hello.rs
247+
$ rustc \-o hello hello.rs
208248

209249
To build a library from a source file:
210-
$ rustc --crate-type=lib hello-lib.rs
250+
$ rustc \-\-crate\-type=lib hello\-lib.rs
211251

212252
To build either with a crate (.rs) file:
213253
$ rustc hello.rs
214254

215255
To build an executable with debug info:
216-
$ rustc -g -o hello hello.rs
256+
$ rustc \-g \-o hello hello.rs
217257

218258
.SH "SEE ALSO"
219259

220-
rustdoc
260+
.BR rustdoc (1)
221261

222262
.SH "BUGS"
223-
See <\fBhttps://github.com/rust-lang/rust/issues\fR> for issues.
263+
See
264+
.UR https://github.com/rust\-lang/rust/issues
265+
.UE
266+
for issues.
224267

225268
.SH "AUTHOR"
226-
See \fBAUTHORS.txt\fR in the Rust source distribution.
269+
See \fIAUTHORS.txt\fR in the Rust source distribution.
227270

228271
.SH "COPYRIGHT"
229-
This work is dual-licensed under Apache 2.0 and MIT terms. See \fBCOPYRIGHT\fR
230-
file in the rust source distribution.
272+
This work is dual\[hy]licensed under Apache\ 2.0 and MIT terms.
273+
See \fICOPYRIGHT\fR file in the rust source distribution.

0 commit comments

Comments
 (0)