Debian Codegraph @

gcc/rust/lang.opt

raw
1 ; Options for the Rust front end.
2 ; Copyright (C) 2003-2025 Free Software Foundation, Inc.
3 ;
4 ; This file is part of GCC.
5 ;
6 ; GCC is free software; you can redistribute it and/or modify it under
7 ; the terms of the GNU General Public License as published by the Free
8 ; Software Foundation; either version 3, or (at your option) any later
9 ; version.
10 ;
11 ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 ; for more details.
15 ;
16 ; You should have received a copy of the GNU General Public License
17 ; along with GCC; see the file COPYING3. If not see
18 ; <http://www.gnu.org/licenses/>.
19
20 ; See the GCC internals manual for a description of this file's format.
21
22 ; Please try to keep this file in ASCII collating order.
23
24 ; Describes command-line options used by this frontend
25
26 Language
27 Rust
28
29 I
30 Rust Joined Separate
31 ; Documented in c.opt
32
33 L
34 Rust Joined Separate
35 ; Not documented
36
37 Wall
38 Rust
39 ; Documented in c.opt
40
41 Wunused-variable
42 Rust Var(warn_unused_variable) Warning
43 ; documented in common.opt
44
45 Wunused-const-variable
46 Rust Warning Alias(Wunused-const-variable=, 2, 0)
47 Warn when a const variable is unused.
48
49 Wunused-const-variable=
50 Rust Joined RejectNegative UInteger Var(warn_unused_const_variable) Warning LangEnabledBy(Rust,Wunused-variable, 1, 0) IntegerRange(0, 2)
51 Warn when a const variable is unused.
52
53 Wunused-result
54 Rust Var(warn_unused_result) Warning
55 Warn if a caller of a function, marked with attribute warn_unused_result, does not use its return value.
56
57 Winfinite-recursion
58 Rust Var(warn_infinite_recursion) Warning
59 Warn for infinitely recursive calls.
60
61 frust-crate=
62 Rust Joined RejectNegative
63 -frust-crate=<name> Set the crate name for the compilation
64
65 frust-extern=
66 Rust RejectNegative Joined
67 -frust-extern= Specify where an external library is located
68
69 frust-debug
70 Rust Var(flag_rust_debug)
71 Dump various Rust front end internals.
72
73 frust-dump-
74 Rust Joined RejectNegative
75 -frust-dump-<type> Dump Rust frontend internal information.
76
77 frust-incomplete-and-experimental-compiler-do-not-use
78 Rust Var(flag_rust_experimental)
79 Enable experimental compilation of Rust files at your own risk
80
81 frust-max-recursion-depth=
82 Rust RejectNegative Type(int) Var(rust_max_recursion_depth) Init(64)
83 -frust-max-recursion-depth=<integer>
84
85 frust-crate-type=
86 Rust Joined RejectNegative Enum(frust_crate_type) Var(flag_rust_crate_type)
87 -frust-crate-type=[bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] Crate type to emit
88
89 Enum
90 Name(frust_crate_type) Type(int) UnknownError(unknown crate type: '%qs')
91
92 EnumValue
93 Enum(frust_crate_type) String(bin) Value(0)
94
95 EnumValue
96 Enum(frust_crate_type) String(lib) Value(1)
97
98 EnumValue
99 Enum(frust_crate_type) String(rlib) Value(2)
100
101 EnumValue
102 Enum(frust_crate_type) String(dylib) Value(3)
103
104 EnumValue
105 Enum(frust_crate_type) String(cdylib) Value(4)
106
107 EnumValue
108 Enum(frust_crate_type) String(staticlib) Value(5)
109
110 EnumValue
111 Enum(frust_crate_type) String(proc-macro) Value(6)
112
113 frust-mangling=
114 Rust Joined RejectNegative Enum(frust_mangling) Var(flag_rust_mangling)
115 -frust-mangling=[legacy|v0] Version to use for name mangling
116
117 Enum
118 Name(frust_mangling) Type(int) UnknownError(unknown rust mangling option %qs)
119
120 EnumValue
121 Enum(frust_mangling) String(legacy) Value(0)
122
123 EnumValue
124 Enum(frust_mangling) String(v0) Value(1)
125
126 frust-cfg=
127 Rust Joined RejectNegative
128 -frust-cfg=<name> Set a config expansion option
129
130 frust-edition=
131 Rust Joined RejectNegative Enum(frust_edition) Var(flag_rust_edition)
132 -frust-edition=[2015|2018|2021] Edition to use when compiling rust code
133
134 Enum
135 Name(frust_edition) Type(int) UnknownError(unknown rust edition %qs)
136
137 EnumValue
138 Enum(frust_edition) String(2015) Value(0)
139
140 EnumValue
141 Enum(frust_edition) String(2018) Value(1)
142
143 EnumValue
144 Enum(frust_edition) String(2021) Value(2)
145
146 frust-embed-metadata
147 Rust Var(flag_rust_embed_metadata)
148 Enable embedding metadata directly into object files
149
150 frust-metadata-output=
151 Rust Joined RejectNegative
152 -frust-metadata-output=<path.rox> Path to output crate metadata
153
154 o
155 Rust Joined Separate
156 ; Documented in common.opt
157
158 frust-compile-until=
159 Rust Joined RejectNegative Enum(frust_compile_until) Var(flag_rust_compile_until)
160 -frust-compile-until=[ast|attributecheck|expansion|astvalidation|featuregating|nameresolution|lowering|typecheck|privacy|unsafety|const|borrowcheck|compilation|end] The pipeline will run up until this stage when compiling Rust code
161
162 Enum
163 Name(frust_compile_until) Type(int) UnknownError(unknown rust compile-until %qs)
164
165 EnumValue
166 Enum(frust_compile_until) String(ast) Value(0)
167
168 EnumValue
169 Enum(frust_compile_until) String(attributecheck) Value(1)
170
171 EnumValue
172 Enum(frust_compile_until) String(expansion) Value(2)
173
174 EnumValue
175 Enum(frust_compile_until) String(astvalidation) Value(3)
176
177 EnumValue
178 Enum(frust_compile_until) String(featuregating) Value(4)
179
180 EnumValue
181 Enum(frust_compile_until) String(nameresolution) Value(5)
182
183 EnumValue
184 Enum(frust_compile_until) String(lowering) Value(6)
185
186 EnumValue
187 Enum(frust_compile_until) String(typecheck) Value(7)
188
189 EnumValue
190 Enum(frust_compile_until) String(privacy) Value(8)
191
192 EnumValue
193 Enum(frust_compile_until) String(unsafety) Value(9)
194
195 EnumValue
196 Enum(frust_compile_until) String(const) Value(10)
197
198 EnumValue
199 Enum(frust_compile_until) String(borrowcheck) Value(11)
200
201 EnumValue
202 Enum(frust_compile_until) String(compilation) Value(12)
203
204 EnumValue
205 Enum(frust_compile_until) String(end) Value(13)
206
207 frust-name-resolution-2.0
208 Rust Var(flag_name_resolution_2_0)
209 Use the temporary and experimental name resolution pipeline instead of the stable one
210
211 frust-borrowcheck
212 Rust Var(flag_borrowcheck)
213 Use the WIP borrow checker.
214
215 frust-panic=
216 Rust Joined RejectNegative Enum(frust_panic) Var(flag_rust_panic)
217 -frust-edition=[unwind|abort] Panic strategy to compile crate with
218
219 Enum
220 Name(frust_panic) Type(int) UnknownError(unknown panic strategy %qs)
221
222 EnumValue
223 Enum(frust_panic) String(unwind) Value(0)
224
225 EnumValue
226 Enum(frust_panic) String(abort) Value(1)
227
228 frust-overflow-checks
229 Rust Var(flag_overflow_checks) Init(1)
230 Enable the overflow checks in code generation
231
232 ; This comment is to ensure we retain the blank line above.