Skip to content

Commit afe73cc

Browse files
committed
Update manpage based on current usage message
1 parent 6366e74 commit afe73cc

File tree

1 file changed

+93
-43
lines changed

1 file changed

+93
-43
lines changed

man/rustc.1

+93-43
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.TH RUSTC "1" "October 2012" "rustc 0.4" "User Commands"
1+
.TH RUSTC "1" "February 2013" "rustc 0.6" "User Commands"
22
.SH NAME
33
rustc \- rust compiler
44
.SH SYNOPSIS
55
.B rustc
6-
[\fIoptions\fR] \fI<input>\fR
6+
[\fIOPTIONS\fR] \fIINPUT\fR
77

88
.SH DESCRIPTION
99
This program is a compiler for the Rust language, available at
@@ -18,88 +18,134 @@ Compile an executable crate (default)
1818
\fB\-c\fR
1919
Compile and assemble, but do not link
2020
.TP
21-
\fB\-\-cfg\fR <cfgspec>
21+
\fB\-\-cfg\fR SPEC
2222
Configure the compilation environment
2323
.TP
2424
\fB\-\-emit\-llvm\fR
2525
Produce an LLVM bitcode file
2626
.TP
27-
\fB\-g\fR
28-
Produce debug info (experimental)
29-
.TP
30-
\fB\-\-gc\fR
31-
Garbage collect shared data (experimental/temporary)
32-
.TP
33-
\fB\-h\fR \fB\-\-help\fR
27+
\fB\-h\fR, \fB\-\-help\fR
3428
Display this message
3529
.TP
36-
\fB\-L\fR <path>
30+
\fB\-L\fR PATH
3731
Add a directory to the library search path
3832
.TP
3933
\fB\-\-lib\fR
4034
Compile a library crate
4135
.TP
4236
\fB\-\-ls\fR
43-
List the symbols defined by a compiled library crate
44-
.TP
45-
\fB\-\-jit\fR
46-
Execute using JIT (experimental)
37+
List the symbols defined by a library crate
4738
.TP
4839
\fB\-\-no\-trans\fR
4940
Run all passes except translation; no output
5041
.TP
5142
\fB\-O\fR
52-
Equivalent to \fB\-\-opt\-level\fR=\fI2\fR
43+
Equivalent to \fI\-\-opt\-level=2\fR
5344
.TP
54-
\fB\-o\fR <filename>
45+
\fB\-o\fR FILENAME
5546
Write output to <filename>
5647
.TP
57-
\fB\-\-opt\-level\fR <lvl>
58-
Optimize with possible levels 0\-3
48+
\fB\-\-opt\-level\fR LEVEL
49+
Optimize with possible levels 0-3
5950
.TP
60-
\fB\-\-out\-dir\fR <dir>
61-
Write output to compiler\-chosen filename in <dir>
51+
\fB\-\-out\-dir\fR DIR
52+
Write output to compiler-chosen filename in <dir>
6253
.TP
6354
\fB\-\-parse\-only\fR
6455
Parse only; do not compile, assemble, or link
6556
.TP
66-
\fB\-\-pretty\fR [type]
67-
Pretty\-print the input instead of compiling;
68-
valid types are: normal (un\-annotated source),
69-
expanded (crates expanded), typed (crates expanded,
70-
with type annotations), or identified (fully
71-
parenthesized, AST nodes and blocks with IDs)
57+
\fB\-\-pretty\fR [TYPE]
58+
Pretty-print the input instead of compiling; valid types are: normal
59+
(un-annotated source), expanded (crates expanded), typed (crates
60+
expanded, with type annotations), or identified (fully parenthesized,
61+
AST nodes and blocks with IDs)
7262
.TP
7363
\fB\-S\fR
7464
Compile only; do not assemble or link
7565
.TP
7666
\fB\-\-save\-temps\fR
77-
Write intermediate files (.bc, .opt.bc, .o)
78-
in addition to normal output
67+
Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
7968
.TP
80-
\fB\-\-static\fR
81-
Use or produce static libraries or binaries
82-
(experimental)
83-
.TP
84-
\fB\-\-sysroot\fR <path>
69+
\fB\-\-sysroot\fR PATH
8570
Override the system root
8671
.TP
8772
\fB\-\-test\fR
8873
Build a test harness
8974
.TP
90-
\fB\-\-target\fR <triple>
91-
Target cpu\-manufacturer\-kernel[\-os] to compile for
92-
(default: host triple)
93-
(see http://sources.redhat.com/autobook/autobook/
94-
autobook_17.html for detail)
75+
\fB\-\-target\fR TRIPLE
76+
Target triple cpu-manufacturer-kernel[-os] to compile for (see
77+
http://sources.redhat.com/autobook/autobook/autobook_17.html
78+
for detail)
9579
.TP
96-
\fB\-W help\fR
80+
\fB\-W\fR help
9781
Print 'lint' options and default settings
9882
.TP
99-
\fB\-Z help\fR
100-
Print internal options for debugging rustc
83+
\fB\-W\fR OPT, \fB\-\-warn\fR OPT
84+
Set lint warnings
85+
.TP
86+
\fB\-A\fR OPT, \fB\-\-allow\fR OPT
87+
Set lint allowed
10188
.TP
102-
\fB\-v\fR \fB\-\-version\fR
89+
\fB\-D\fR OPT, \fB\-\-deny\fR OPT
90+
Set lint denied
91+
.TP
92+
\fB\-F\fR OPT, \fB\-\-forbid\fR OPT
93+
Set lint forbidden
94+
.TP
95+
\fB\-Z\fR FLAG
96+
Set internal debugging options. Use "-Z help" to print available options.
97+
98+
Available debug flags are:
99+
.RS
100+
.IP \[bu]
101+
\fBverbose\fR - in general, enable more debug printouts
102+
.IP \[bu]
103+
\fBtime\-passes\fR - measure time of each rustc pass
104+
.IP \[bu]
105+
\fBcount\-llvm\-insns\fR - count where LLVM instrs originate
106+
.IP \[bu]
107+
\fBtime\-llvm\-passes\fR - measure time of each LLVM pass
108+
.IP \[bu]
109+
\fBtrans\-stats\fR - gather trans statistics
110+
.IP \[bu]
111+
\fBno\-asm\-comments\fR - omit comments when using \fI\-S\fR
112+
.IP \[bu]
113+
\fBno\-verify\fR - skip LLVM verification
114+
.IP \[bu]
115+
\fBtrace\fR - emit trace logs
116+
.IP \[bu]
117+
\fBcoherence\fR - perform coherence checking
118+
.IP \[bu]
119+
\fBborrowck\-stats\fR - gather borrowck statistics
120+
.IP \[bu]
121+
\fBborrowck\-note\-pure\fR - note where purity is req'd
122+
.IP \[bu]
123+
\fBborrowck\-note\-loan\fR - note where loans are req'd
124+
.IP \[bu]
125+
\fBno\-landing\-pads\fR - omit landing pads for unwinding
126+
.IP \[bu]
127+
\fBdebug\-llvm\fR - enable debug output from LLVM
128+
.IP \[bu]
129+
\fBcount\-type\-sizes\fR - count the sizes of aggregate types
130+
.IP \[bu]
131+
\fBmeta\-stats\fR - gather metadata statistics
132+
.IP \[bu]
133+
\fBno\-opt\fR - do not optimize, even if \fI\-O\fR is passed
134+
.IP \[bu]
135+
\fBno\-monomorphic\-collapse\fR - do not collapse template instantiations
136+
.IP \[bu]
137+
\fBgc\fR - Garbage collect shared data (experimental)
138+
.IP \[bu]
139+
\fBjit\fR - Execute using JIT (experimental)
140+
.IP \[bu]
141+
\fBextra\-debug\-info\fR - Extra debugging info (experimental)
142+
.IP \[bu]
143+
\fBdebug\-info\fR - Produce debug info (experimental)
144+
.IP \[bu]
145+
\fBstatic\fR - Use or produce static libraries or binaries (experimental)
146+
.RE
147+
.TP
148+
\fB\-v\fR, \fB\-\-version\fR
103149
Print version info and exit
104150

105151
.SH "EXAMPLES"
@@ -112,6 +158,10 @@ To build a library from a source file:
112158
To build either with a crate (.rc) file:
113159
$ rustc hello.rc
114160

161+
To build an executable with debug info (experimental):
162+
$ rustc -Z debug-info -o hello hello.rs
163+
164+
115165
.SH "BUGS"
116166
See <\fBhttps://github.com/mozilla/rust/issues\fR> for issues.
117167

0 commit comments

Comments
 (0)