Skip to content

Commit 0fa7858

Browse files
committed
Update the rustc manpage
1 parent 23fcab9 commit 0fa7858

File tree

1 file changed

+58
-61
lines changed

1 file changed

+58
-61
lines changed

man/rustc.1

+58-61
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,114 @@
1-
.TH RUSTC "1" "January 2012" "Rust" "User Commands"
2-
1+
.TH RUSTC "1" "May 2012" "rustc 0.2 (23fcab9)" "User Commands"
32
.SH NAME
43
rustc \- rust compiler
5-
64
.SH SYNOPSIS
7-
rustc [\fB-h\fR] [\fB-v\fR] [\fB-o\fR \fIoutfile\fR]
8-
[\fB--lib\fR] [\fB--static\fR] [\fB-L\fR \fIpath\fR]
9-
[\fB-g\fR] [\fB-S\fR] [\fB-c\fR] <\fIinput\fR>
10-
.PP
11-
Only the most commonly-used options are listed here. All options are listed and
12-
described below.
5+
.B rustc
6+
[\fIoptions\fR] \fI<input>\fR
137

148
.SH DESCRIPTION
159
This program is a compiler for the Rust language, available at
1610
<\fBhttps://www.rust-lang.org\fR>.
1711

1812
.SH OPTIONS
13+
1914
.TP
20-
\fB--bin\fR
15+
\fB\-\-bin\fR
2116
Compile an executable crate (default)
2217
.TP
23-
\fB-c\fR
18+
\fB\-c\fR
2419
Compile and assemble, but do not link
2520
.TP
26-
\fB--cfg <cfgspec>\fR
21+
\fB\-\-cfg\fR <cfgspec>
2722
Configure the compilation environment
2823
.TP
29-
\fB--emit-llvm\fR
24+
\fB\-\-emit\-llvm\fR
3025
Produce an LLVM bitcode file
3126
.TP
32-
\fB-g\fR
27+
\fB\-g\fR
3328
Produce debug info
3429
.TP
35-
\fB--gc\fR
30+
\fB\-\-gc\fR
3631
Garbage collect shared data (experimental/temporary)
3732
.TP
38-
\fB-h --help\fR
33+
\fB\-h\fR \fB\-\-help\fR
3934
Display this message
4035
.TP
41-
\fB-L <path>\fR
36+
\fB\-L\fR <path>
4237
Add a directory to the library search path
4338
.TP
44-
\fB--lib\fR
39+
\fB\-\-lib\fR
4540
Compile a library crate
4641
.TP
47-
\fB--ls\fR
48-
List the symbols defined by a compiled librar crate
42+
\fB\-\-ls\fR
43+
List the symbols defined by a compiled library crate
4944
.TP
50-
\fB--no-asm-comments\fR
51-
Do not add comments into the assembly source
52-
.TP
53-
\fB--no-lint-ctypes\fR
54-
Suppress warnings for possibly incorrect ctype usage
55-
.TP
56-
\fB--no-trans\fR
45+
\fB\-\-no\-trans\fR
5746
Run all passes except translation; no output
5847
.TP
59-
\fB--no-verify\fR
60-
Suppress LLVM verification step (slight speedup)
61-
(see http://llvm.org/docs/Passes.html for detail)
62-
.TP
63-
\fB-O\fR
64-
Equivalent to --opt-level=2
48+
\fB\-O\fR
49+
Equivalent to \fB\-\-opt\-level\fR=\fI2\fR
6550
.TP
66-
\fB-o <filename>\fR
51+
\fB\-o\fR <filename>
6752
Write output to <filename>
6853
.TP
69-
\fB--opt-level <lvl>\fR
70-
Optimize with possible levels 0-3
54+
\fB\-\-opt\-level\fR <lvl>
55+
Optimize with possible levels 0\-3
7156
.TP
72-
\fB--out-dir <dir>\fR
73-
Write output to compiler-chosen filename in <dir>
57+
\fB\-\-out\-dir\fR <dir>
58+
Write output to compiler\-chosen filename in <dir>
7459
.TP
75-
\fB--parse-only\fR
60+
\fB\-\-parse\-only\fR
7661
Parse only; do not compile, assemble, or link
7762
.TP
78-
\fB--pretty [type]\fR
79-
Pretty-print the input instead of compiling; valid types are: \fBnormal\fR (un-annotated source), \fBexpanded\fR (crates expanded), \fBtyped\fR (crates expanded, with type annotations), or \fBidentified\fR (fully parenthesized, AST nodes and blocks with IDs)
63+
\fB\-\-pretty\fR [type]
64+
Pretty\-print the input instead of compiling;
65+
valid types are: \fBnormal\fR (un\-annotated source),
66+
\fBexpanded\fR (crates expanded), \fBtyped\fR (crates expanded,
67+
with type annotations), or \fBidentified\fR (fully
68+
parenthesized, AST nodes and blocks with IDs)
8069
.TP
81-
\fB-S\fR
70+
\fB\-S\fR
8271
Compile only; do not assemble or link
8372
.TP
84-
\fB--save-temps\fR
85-
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
73+
\fB\-\-save\-temps\fR
74+
Write intermediate files (.bc, .opt.bc, .o)
75+
in addition to normal output
8676
.TP
87-
\fB--static\fR
77+
\fB\-\-static\fR
8878
Use or produce static libraries or binaries
8979
.TP
90-
\fB--stats\fR
80+
\fB\-\-stats\fR
9181
Print compilation statistics
9282
.TP
93-
\fB--sysroot <path>\fR
83+
\fB\-\-sysroot\fR <path>
9484
Override the system root
9585
.TP
96-
\fB--test\fR
97-
Build test harness
86+
\fB\-\-test\fR
87+
Build a test harness
9888
.TP
99-
\fB--target <triple>\fR
100-
Target cpu-manufacturer-kernel[-os] to compile for (default: host triple)
101-
(see http://sources.redhat.com/autobook/autobook/autobook_17.html for detail)
89+
\fB\-\-target\fR <triple>
90+
Target cpu\-manufacturer\-kernel[\-os] to compile for
91+
(default: host triple)
92+
(see http://sources.redhat.com/autobook/autobook/
93+
autobook_17.html for detail)
10294
.TP
103-
\fB--time-passes\fR
104-
Time the individual phases of the compiler
95+
\fB\-W\fR <foo>
96+
enable warning <foo>
10597
.TP
106-
\fB--time-llvm-passes\fR
107-
Time the individual phases of the LLVM backend
98+
\fB\-W\fR no\-<foo>
99+
disable warning <foo>
108100
.TP
109-
\fB-v --version\fR
110-
Print version info and exit
101+
\fB\-W\fR err\-<foo>
102+
enable warning <foo> as an error
103+
.TP
104+
\fB\-W\fR help
105+
Print available warnings and default settings
106+
.TP
107+
\fB\-Z\fR help
108+
list internal options for debugging rustc
111109
.TP
112-
\fB--warn-unused-imports\fR
113-
Warn about unnecessary imports
110+
\fB\-v\fR \fB\-\-version\fR
111+
Print version info and exit
114112

115113
.SH "EXAMPLES"
116114
To build an executable from a source file with a main function:
@@ -131,4 +129,3 @@ See \fBAUTHORS.txt\fR in the rust source distribution. Graydon Hoare
131129

132130
.SH "COPYRIGHT"
133131
See \fBLICENSE.txt\fR in the rust source distribution.
134-

0 commit comments

Comments
 (0)