@@ -27,18 +27,15 @@ Display this message
2727\fB \- L \fR PATH
2828Add a directory to the library search path
2929.TP
30- \fB \-\- linker \fR LINKER
31- Program to use for linking instead of the default
32- .TP
33- \fB \-\- link-args \fR FLAGS
34- A space-separated list of flags passed to the linker
35- .TP
3630\fB \-\- ls \fR
3731List the symbols defined by a library crate
3832.TP
3933\fB \-\- no \- trans \fR
4034Run all passes except translation; no output
4135.TP
36+ \fB \- g \fR , \fB \-\- debuginfo \fR
37+ Emit DWARF debug information into object files generated.
38+ .TP
4239\fB \- O \fR
4340Equivalent to \fI \-\- opt \- level=2 \fR
4441.TP
@@ -48,11 +45,6 @@ Write output to <filename>. Ignored if more than one --emit is specified.
4845\fB \-\- opt \- level \fR LEVEL
4946Optimize with possible levels 0-3
5047.TP
51- \fB \-\- passes \fR NAMES
52- Comma- or space-separated list of optimization passes. Overrides
53- the default passes for the optimization level. A value of 'list'
54- will list the available passes.
55- .TP
5648\fB \-\- out \- dir \fR DIR
5749Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
5850(default the current directory)
@@ -66,9 +58,6 @@ Pretty-print the input instead of compiling; valid types are: normal
6658expanded, with type annotations), or identified (fully parenthesized,
6759AST nodes and blocks with IDs)
6860.TP
69- \fB \-\- save \- temps \fR
70- Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
71- .TP
7261\fB \-\- sysroot \fR PATH
7362Override the system root
7463.TP
@@ -80,12 +69,6 @@ Target triple cpu-manufacturer-kernel[-os] to compile for (see
8069http://sources.redhat.com/autobook/autobook/autobook_17.html
8170for details)
8271.TP
83- \fB \-\- target-feature \fR TRIPLE
84- Target-specific attributes (see llc -mattr=help for details)
85- .TP
86- \fB \-\- android-cross-path \fR PATH
87- The path to the Android NDK
88- .TP
8972\fB \- W \fR help
9073Print 'lint' options and default settings
9174.TP
@@ -104,9 +87,80 @@ Set lint forbidden
10487\fB \- Z \fR FLAG
10588Set internal debugging options. Use "-Z help" to print available options.
10689.TP
90+ \fB \- C \fR FLAG[=VAL], \fB \-\- codegen \fR FLAG[=VAL]
91+ Set a codegen-related flag to the value specifie.d Use "-C help" to print
92+ available flags. See CODEGEN OPTIONS below
93+ .TP
10794\fB \- v \fR , \fB \-\- version \fR
10895Print version info and exit
10996
97+ .SH CODEGEN OPTIONS
98+
99+ .TP
100+ \fB ar \fR =/path/to/ar
101+ Path to the archive utility to use when assembling archives.
102+ .TP
103+ \fB linker \fR =/path/to/cc
104+ Path to the linker utility to use when linking libraries, executables, and
105+ objects.
106+ .TP
107+ \fB link-args \fR ='-flag1 -flag2'
108+ A space-separated list of extra arguments to pass to the linker when the linker
109+ is invoked.
110+ .TP
111+ \fB target-cpu \fR =help
112+ Selects a target processor. If the value is 'help', then a list of available
113+ cpus is printed.
114+ .TP
115+ \fB target-feature \fR ='+feature1 -feature2'
116+ A space-separated list of features to enable or disable for the target. A
117+ preceding '+' enables a feature while a preceding '-' disables it. Available
118+ features can be discovered through target-cpu=help.
119+ .TP
120+ \fB passes \fR =list
121+ A space-separated list of extra LLVM passes to run. A value of 'list' will
122+ cause rustc to print all known passes and exit. The passes specified are
123+ appended at the end of the normal pass manager.
124+ .TP
125+ \fB llvm-args \fR ='-arg1 -arg2'
126+ A space-separted list of argument to pass through to LLVM.
127+ .TP
128+ \fB save-temps \fR
129+ If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
130+ throughout compilation in the output directory.
131+ .TP
132+ \fB android-cross-path \fR =path/to/ndk/bin
133+ Directory to find the Android NDK cross-compilation tools
134+ .TP
135+ \fB no-rpath \fR
136+ If specified, then the rpath value for dynamic libraries will not be set in
137+ either dynamic library or executable outputs.
138+ .TP
139+ \fB no-prepopulate-passes \fR
140+ Suppresses pre-population of the LLVM pass manager that is run over the module.
141+ .TP
142+ \fB no-vectorize-loops \fR
143+ Suppresses running the loop vectorization LLVM pass, regardless of optimization
144+ level.
145+ .TP
146+ \fB no-vectorize-slp \fR
147+ Suppresses running the LLVM SLP vectorization pass, regardless of optimization
148+ level.
149+ .TP
150+ \fB soft-float \fR
151+ Generates software floating point library calls instead of hardware
152+ instructions.
153+ .TP
154+ \fB gen-crate-map \fR
155+ Forces generate of a toplevel crate map. May be required for logging to work
156+ when rust is embedded into another application.
157+ .TP
158+ \fB prefer-dynamic \fR
159+ Prefers dynamic linking to static linking.
160+ .TP
161+ \fB no-integrated-as \fR
162+ Force usage of an external assembler rather than LLVM's integrated one.
163+
110164.SH "EXAMPLES"
111165To build an executable from a source file with a main function:
112166 $ rustc -o hello hello.rs
@@ -117,8 +171,8 @@ To build a library from a source file:
117171To build either with a crate (.rs) file:
118172 $ rustc hello.rs
119173
120- To build an executable with debug info (experimental) :
121- $ rustc -Z debug-info -o hello hello.rs
174+ To build an executable with debug info:
175+ $ rustc -g -o hello hello.rs
122176
123177.SH "SEE ALSO"
124178
0 commit comments