@@ -27,15 +27,18 @@ 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
3036\fB \-\- ls \fR
3137List the symbols defined by a library crate
3238.TP
3339\fB \-\- no \- trans \fR
3440Run all passes except translation; no output
3541.TP
36- \fB \- g \fR , \fB \-\- debuginfo \fR
37- Emit DWARF debug information into object files generated.
38- .TP
3942\fB \- O \fR
4043Equivalent to \fI \-\- opt \- level=2 \fR
4144.TP
@@ -45,6 +48,11 @@ Write output to <filename>. Ignored if more than one --emit is specified.
4548\fB \-\- opt \- level \fR LEVEL
4649Optimize with possible levels 0-3
4750.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
4856\fB \-\- out \- dir \fR DIR
4957Write output to compiler-chosen filename in <dir>. Ignored if -o is specified.
5058(default the current directory)
@@ -58,6 +66,9 @@ Pretty-print the input instead of compiling; valid types are: normal
5866expanded, with type annotations), or identified (fully parenthesized,
5967AST nodes and blocks with IDs)
6068.TP
69+ \fB \-\- save \- temps \fR
70+ Write intermediate files (.bc, .opt.bc, .o) in addition to normal output
71+ .TP
6172\fB \-\- sysroot \fR PATH
6273Override the system root
6374.TP
@@ -69,6 +80,12 @@ Target triple cpu-manufacturer-kernel[-os] to compile for (see
6980http://sources.redhat.com/autobook/autobook/autobook_17.html
7081for details)
7182.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
7289\fB \- W \fR help
7390Print 'lint' options and default settings
7491.TP
@@ -87,80 +104,9 @@ Set lint forbidden
87104\fB \- Z \fR FLAG
88105Set internal debugging options. Use "-Z help" to print available options.
89106.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
94107\fB \- v \fR , \fB \-\- version \fR
95108Print version info and exit
96109
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-
164110.SH "EXAMPLES"
165111To build an executable from a source file with a main function:
166112 $ rustc -o hello hello.rs
@@ -171,8 +117,8 @@ To build a library from a source file:
171117To build either with a crate (.rs) file:
172118 $ rustc hello.rs
173119
174- To build an executable with debug info:
175- $ rustc -g -o hello hello.rs
120+ To build an executable with debug info (experimental) :
121+ $ rustc -Z debug-info -o hello hello.rs
176122
177123.SH "SEE ALSO"
178124
0 commit comments