]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | # Sample TOML configuration file for building Rust. |
2 | # | |
3 | # To configure rustbuild, copy this file to the directory from which you will be | |
4 | # running the build, and name it config.toml. | |
5 | # | |
6 | # All options are commented out by default in this file, and they're commented | |
7 | # out with their default values. The build system by default looks for | |
8 | # `config.toml` in the current directory of a build for build configuration, but | |
9 | # a custom configuration file can also be specified with `--config` to the build | |
10 | # system. | |
11 | ||
1b1a35ee XL |
12 | # Keeps track of the last version of `x.py` used. |
13 | # If it does not match the version that is currently running, | |
14 | # `x.py` will prompt you to update it and read the changelog. | |
15 | # See `src/bootstrap/CHANGELOG.md` for more information. | |
29967ef6 | 16 | changelog-seen = 2 |
1b1a35ee XL |
17 | |
18 | # ============================================================================= | |
19 | # Global Settings | |
20 | # ============================================================================= | |
21 | ||
22 | # Use different pre-set defaults than the global defaults. | |
23 | # | |
24 | # See `src/bootstrap/defaults` for more information. | |
25 | # Note that this has no default value (x.py uses the defaults in `config.toml.example`). | |
26 | #profile = <none> | |
27 | ||
ea8adc8c XL |
28 | # ============================================================================= |
29 | # Tweaking how LLVM is compiled | |
30 | # ============================================================================= | |
31 | [llvm] | |
32 | ||
1b1a35ee XL |
33 | # Whether to use Rust CI built LLVM instead of locally building it. |
34 | # | |
35 | # Unless you're developing for a target where Rust CI doesn't build a compiler | |
36 | # toolchain or changing LLVM locally, you probably want to set this to true. | |
37 | # | |
5869c6ff XL |
38 | # This is false by default so that distributions don't unexpectedly download |
39 | # LLVM from the internet. | |
40 | # | |
136023e0 | 41 | # All tier 1 targets are currently supported; set this to `"if-available"` if |
5869c6ff | 42 | # you are not sure whether you're on a tier 1 target. |
1b1a35ee XL |
43 | # |
44 | # We also currently only support this when building LLVM for the build triple. | |
45 | # | |
46 | # Note that many of the LLVM options are not currently supported for | |
47 | # downloading. Currently only the "assertions" option can be toggled. | |
48 | #download-ci-llvm = false | |
49 | ||
dfeec247 XL |
50 | # Indicates whether LLVM rebuild should be skipped when running bootstrap. If |
51 | # this is `false` then the compiler's LLVM will be rebuilt whenever the built | |
52 | # version doesn't have the correct hash. If it is `true` then LLVM will never | |
53 | # be rebuilt. The default value is `false`. | |
54 | #skip-rebuild = false | |
55 | ||
ea8adc8c XL |
56 | # Indicates whether the LLVM build is a Release or Debug build |
57 | #optimize = true | |
58 | ||
b7449926 XL |
59 | # Indicates whether LLVM should be built with ThinLTO. Note that this will |
60 | # only succeed if you use clang, lld, llvm-ar, and llvm-ranlib in your C/C++ | |
61 | # toolchain (see the `cc`, `cxx`, `linker`, `ar`, and `ranlib` options below). | |
62 | # More info at: https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap | |
63 | #thin-lto = false | |
64 | ||
ea8adc8c XL |
65 | # Indicates whether an LLVM Release build should include debug info |
66 | #release-debuginfo = false | |
67 | ||
68 | # Indicates whether the LLVM assertions are enabled or not | |
69 | #assertions = false | |
70 | ||
71 | # Indicates whether ccache is used when building LLVM | |
72 | #ccache = false | |
73 | # or alternatively ... | |
74 | #ccache = "/path/to/ccache" | |
75 | ||
76 | # If an external LLVM root is specified, we automatically check the version by | |
77 | # default to make sure it's within the range that we're expecting, but setting | |
78 | # this flag will indicate that this version check should not be done. | |
abe05a73 | 79 | #version-check = true |
ea8adc8c | 80 | |
1b1a35ee | 81 | # Link libstdc++ statically into the rustc_llvm instead of relying on a |
ea8adc8c XL |
82 | # dynamic version to be available. |
83 | #static-libstdcpp = false | |
84 | ||
1b1a35ee XL |
85 | # Whether to use Ninja to build LLVM. This runs much faster than make. |
86 | #ninja = true | |
ea8adc8c XL |
87 | |
88 | # LLVM targets to build support for. | |
89 | # Note: this is NOT related to Rust compilation targets. However, as Rust is | |
90 | # dependent on LLVM for code generation, turning targets off here WILL lead to | |
91 | # the resulting rustc being unable to compile for the disabled architectures. | |
92 | # Also worth pointing out is that, in case support for new targets are added to | |
93 | # LLVM, enabling them here doesn't mean Rust is automatically gaining said | |
94 | # support. You'll need to write a target specification at least, and most | |
95 | # likely, teach rustc about the C ABI of the target. Get in touch with the | |
96 | # Rust team and file an issue if you need assistance in porting! | |
17df50a5 | 97 | #targets = "AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" |
ea8adc8c XL |
98 | |
99 | # LLVM experimental targets to build support for. These targets are specified in | |
100 | # the same format as above, but since these targets are experimental, they are | |
101 | # not built by default and the experimental Rust compilation targets that depend | |
416331ca | 102 | # on them will not work unless the user opts in to building them. |
f035d41b | 103 | #experimental-targets = "AVR" |
ea8adc8c XL |
104 | |
105 | # Cap the number of parallel linker invocations when compiling LLVM. | |
106 | # This can be useful when building LLVM with debug info, which significantly | |
107 | # increases the size of binaries and consequently the memory required by | |
108 | # each linker process. | |
109 | # If absent or 0, linker invocations are treated like any other job and | |
110 | # controlled by rustbuild's -j parameter. | |
111 | #link-jobs = 0 | |
112 | ||
113 | # When invoking `llvm-config` this configures whether the `--shared` argument is | |
114 | # passed to prefer linking to shared libraries. | |
cdc7bbd5 | 115 | # NOTE: `thin-lto = true` requires this to be `true` and will give an error otherwise. |
ea8adc8c XL |
116 | #link-shared = false |
117 | ||
b7449926 | 118 | # When building llvm, this configures what is being appended to the version. |
ba9703b0 XL |
119 | # The default is "-rust-$version-$channel", except for dev channel where rustc |
120 | # version number is omitted. To use LLVM version as is, provide an empty string. | |
121 | #version-suffix = "-rust-dev" | |
b7449926 | 122 | |
94b46f34 | 123 | # On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass |
cdc7bbd5 XL |
124 | # with clang-cl, so this is special in that it only compiles LLVM with clang-cl. |
125 | # Note that this takes a /path/to/clang-cl, not a boolean. | |
126 | #clang-cl = cc | |
94b46f34 | 127 | |
9fa01778 | 128 | # Pass extra compiler and linker flags to the LLVM CMake build. |
cdc7bbd5 XL |
129 | #cflags = "" |
130 | #cxxflags = "" | |
131 | #ldflags = "" | |
9fa01778 | 132 | |
0731742a XL |
133 | # Use libc++ when building LLVM instead of libstdc++. This is the default on |
134 | # platforms already use libc++ as the default C++ library, but this option | |
135 | # allows you to use libc++ even on platforms when it's not. You need to ensure | |
136 | # that your host compiler ships with libc++. | |
cdc7bbd5 | 137 | #use-libcxx = false |
0731742a | 138 | |
9fa01778 | 139 | # The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake. |
cdc7bbd5 | 140 | #use-linker = <none> (path) |
9fa01778 | 141 | |
532ac7d7 XL |
142 | # Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES` |
143 | #allow-old-toolchain = false | |
9fa01778 | 144 | |
29967ef6 XL |
145 | # Whether to include the Polly optimizer. |
146 | #polly = false | |
147 | ||
ea8adc8c XL |
148 | # ============================================================================= |
149 | # General build configuration options | |
150 | # ============================================================================= | |
151 | [build] | |
cdc7bbd5 XL |
152 | # The default stage to use for the `check` subcommand |
153 | #check-stage = 0 | |
154 | ||
1b1a35ee XL |
155 | # The default stage to use for the `doc` subcommand |
156 | #doc-stage = 0 | |
157 | ||
158 | # The default stage to use for the `build` subcommand | |
159 | #build-stage = 1 | |
160 | ||
161 | # The default stage to use for the `test` subcommand | |
162 | #test-stage = 1 | |
163 | ||
164 | # The default stage to use for the `dist` subcommand | |
165 | #dist-stage = 2 | |
166 | ||
167 | # The default stage to use for the `install` subcommand | |
168 | #install-stage = 2 | |
169 | ||
170 | # The default stage to use for the `bench` subcommand | |
171 | #bench-stage = 2 | |
ea8adc8c XL |
172 | |
173 | # Build triple for the original snapshot compiler. This must be a compiler that | |
174 | # nightlies are already produced for. The current platform must be able to run | |
175 | # binaries of this build triple and the nightly will be used to bootstrap the | |
176 | # first compiler. | |
f035d41b | 177 | # |
cdc7bbd5 XL |
178 | # Defaults to platform where `x.py` is run. |
179 | #build = "x86_64-unknown-linux-gnu" (as an example) | |
ea8adc8c | 180 | |
1b1a35ee XL |
181 | # Which triples to produce a compiler toolchain for. Each of these triples will |
182 | # be bootstrapped from the build triple themselves. | |
f035d41b | 183 | # |
cdc7bbd5 XL |
184 | # Defaults to just the build triple. |
185 | #host = ["x86_64-unknown-linux-gnu"] (as an example) | |
ea8adc8c | 186 | |
1b1a35ee XL |
187 | # Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of |
188 | # these triples will be bootstrapped from the build triple themselves. | |
f035d41b | 189 | # |
1b1a35ee XL |
190 | # Defaults to `host`. If you set this explicitly, you likely want to add all |
191 | # host triples to this list as well in order for those host toolchains to be | |
192 | # able to compile programs for their native target. | |
cdc7bbd5 | 193 | #target = ["x86_64-unknown-linux-gnu"] (as an example) |
ea8adc8c | 194 | |
f9f354fc XL |
195 | # Use this directory to store build artifacts. |
196 | # You can use "$ROOT" to indicate the root of the git repository. | |
197 | #build-dir = "build" | |
198 | ||
ea8adc8c XL |
199 | # Instead of downloading the src/stage0.txt version of Cargo specified, use |
200 | # this Cargo binary instead to build all Rust code | |
cdc7bbd5 | 201 | #cargo = "/path/to/cargo" |
ea8adc8c XL |
202 | |
203 | # Instead of downloading the src/stage0.txt version of the compiler | |
204 | # specified, use this rustc binary instead as the stage0 snapshot compiler. | |
cdc7bbd5 | 205 | #rustc = "/path/to/rustc" |
ea8adc8c | 206 | |
dfeec247 XL |
207 | # Instead of download the src/stage0.txt version of rustfmt specified, |
208 | # use this rustfmt binary instead as the stage0 snapshot rustfmt. | |
cdc7bbd5 | 209 | #rustfmt = "/path/to/rustfmt" |
dfeec247 | 210 | |
ea8adc8c XL |
211 | # Flag to specify whether any documentation is built. If false, rustdoc and |
212 | # friends will still be compiled but they will not be used to generate any | |
213 | # documentation. | |
214 | #docs = true | |
215 | ||
6a06907d XL |
216 | # Flag to specify whether CSS, JavaScript, and HTML are minified when |
217 | # docs are generated. JSON is always minified, because it's enormous, | |
218 | # and generated in already-minified form from the beginning. | |
219 | #docs-minification = true | |
220 | ||
ea8adc8c XL |
221 | # Indicate whether the compiler should be documented in addition to the standard |
222 | # library and facade crates. | |
223 | #compiler-docs = false | |
224 | ||
e1599b0c | 225 | # Indicate whether git submodules are managed and updated automatically. |
ea8adc8c XL |
226 | #submodules = true |
227 | ||
e1599b0c | 228 | # Update git submodules only when the checked out commit in the submodules differs |
0531ce1d XL |
229 | # from what is committed in the main rustc repo. |
230 | #fast-submodules = true | |
231 | ||
ea8adc8c XL |
232 | # The path to (or name of) the GDB executable to use. This is only used for |
233 | # executing the debuginfo test suite. | |
234 | #gdb = "gdb" | |
235 | ||
236 | # The node.js executable to use. Note that this is only used for the emscripten | |
237 | # target when running tests, otherwise this can be omitted. | |
238 | #nodejs = "node" | |
239 | ||
240 | # Python interpreter to use for various tasks throughout the build, notably | |
241 | # rustdoc tests, the lldb python interpreter, and some dist bits and pieces. | |
532ac7d7 | 242 | # |
f035d41b | 243 | # Defaults to the Python interpreter used to execute x.py |
ba9703b0 | 244 | #python = "python" |
ea8adc8c XL |
245 | |
246 | # Force Cargo to check that Cargo.lock describes the precise dependency | |
247 | # set that all the Cargo.toml files create, instead of updating it. | |
248 | #locked-deps = false | |
249 | ||
250 | # Indicate whether the vendored sources are used for Rust dependencies or not | |
251 | #vendor = false | |
252 | ||
dfeec247 | 253 | # Typically the build system will build the Rust compiler twice. The second |
ea8adc8c XL |
254 | # compiler, however, will simply use its own libraries to link against. If you |
255 | # would rather to perform a full bootstrap, compiling the compiler three times, | |
256 | # then you can set this option to true. You shouldn't ever need to set this | |
257 | # option to true. | |
258 | #full-bootstrap = false | |
259 | ||
dfeec247 | 260 | # Enable a build of the extended Rust tool set which is not only the compiler |
ea8adc8c XL |
261 | # but also tools such as Cargo. This will also produce "combined installers" |
262 | # which are used to install Rust and Cargo together. This is disabled by | |
dfeec247 XL |
263 | # default. The `tools` option (immediately below) specifies which tools should |
264 | # be built if `extended = true`. | |
ea8adc8c XL |
265 | #extended = false |
266 | ||
cdc7bbd5 XL |
267 | # Installs chosen set of extended tools if `extended = true`. By default builds |
268 | # all extended tools except `rust-demangler`, unless the target is also being | |
269 | # built with `profiler = true`. If chosen tool failed to build the installation | |
270 | # fails. If `extended = false`, this option is ignored. | |
271 | #tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src"] # + "rust-demangler" if `profiler` | |
2c00a5a8 | 272 | |
ea8adc8c XL |
273 | # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose |
274 | #verbose = 0 | |
275 | ||
276 | # Build the sanitizer runtimes | |
277 | #sanitizers = false | |
278 | ||
f035d41b XL |
279 | # Build the profiler runtime (required when compiling with options that depend |
280 | # on this runtime, such as `-C profile-generate` or `-Z instrument-coverage`). | |
ea8adc8c XL |
281 | #profiler = false |
282 | ||
0bf4aa26 XL |
283 | # Indicates whether the native libraries linked into Cargo will be statically |
284 | # linked or not. | |
285 | #cargo-native-static = false | |
ea8adc8c XL |
286 | |
287 | # Run the build with low priority, by setting the process group's "nice" value | |
288 | # to +10 on Unix platforms, and by using a "low priority" job object on Windows. | |
289 | #low-priority = false | |
290 | ||
291 | # Arguments passed to the `./configure` script, used during distcheck. You | |
292 | # probably won't fill this in but rather it's filled in by the `./configure` | |
293 | # script. | |
294 | #configure-args = [] | |
295 | ||
296 | # Indicates that a local rebuild is occurring instead of a full bootstrap, | |
297 | # essentially skipping stage0 as the local compiler is recompiling itself again. | |
298 | #local-rebuild = false | |
299 | ||
0531ce1d XL |
300 | # Print out how long each rustbuild step took (mostly intended for CI and |
301 | # tracking over time) | |
302 | #print-step-timings = false | |
303 | ||
6a06907d XL |
304 | # Print out resource usage data for each rustbuild step, as defined by the Unix |
305 | # struct rusage. (Note that this setting is completely unstable: the data it | |
306 | # captures, what platforms it supports, the format of its associated output, and | |
307 | # this setting's very existence, are all subject to change.) | |
308 | #print-step-rusage = false | |
309 | ||
ea8adc8c XL |
310 | # ============================================================================= |
311 | # General install configuration options | |
312 | # ============================================================================= | |
313 | [install] | |
314 | ||
315 | # Instead of installing to /usr/local, install to this path instead. | |
316 | #prefix = "/usr/local" | |
317 | ||
318 | # Where to install system configuration files | |
319 | # If this is a relative path, it will get installed in `prefix` above | |
320 | #sysconfdir = "/etc" | |
321 | ||
322 | # Where to install documentation in `prefix` above | |
323 | #docdir = "share/doc/rust" | |
324 | ||
325 | # Where to install binaries in `prefix` above | |
326 | #bindir = "bin" | |
327 | ||
328 | # Where to install libraries in `prefix` above | |
329 | #libdir = "lib" | |
330 | ||
331 | # Where to install man pages in `prefix` above | |
332 | #mandir = "share/man" | |
333 | ||
cdc7bbd5 | 334 | # Where to install data in `prefix` above |
abe05a73 XL |
335 | #datadir = "share" |
336 | ||
ea8adc8c XL |
337 | # ============================================================================= |
338 | # Options for compiling Rust code itself | |
339 | # ============================================================================= | |
340 | [rust] | |
341 | ||
0bf4aa26 | 342 | # Whether or not to optimize the compiler and standard library. |
e74abb32 XL |
343 | # WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping, |
344 | # building without optimizations takes much longer than optimizing. Further, some platforms | |
345 | # fail to build without this optimization (c.f. #65352). | |
ea8adc8c XL |
346 | #optimize = true |
347 | ||
0bf4aa26 XL |
348 | # Indicates that the build should be configured for debugging Rust. A |
349 | # `debug`-enabled compiler and standard library will be somewhat | |
350 | # slower (due to e.g. checking of debug assertions) but should remain | |
351 | # usable. | |
352 | # | |
353 | # Note: If this value is set to `true`, it will affect a number of | |
354 | # configuration options below as well, if they have been left | |
355 | # unconfigured in this file. | |
356 | # | |
357 | # Note: changes to the `debug` setting do *not* affect `optimize` | |
358 | # above. In theory, a "maximally debuggable" environment would | |
359 | # set `optimize` to `false` above to assist the introspection | |
360 | # facilities of debuggers like lldb and gdb. To recreate such an | |
361 | # environment, explicitly set `optimize` to `false` and `debug` | |
362 | # to `true`. In practice, everyone leaves `optimize` set to | |
363 | # `true`, because an unoptimized rustc with debugging | |
364 | # enabled becomes *unusably slow* (e.g. rust-lang/rust#24840 | |
365 | # reported a 25x slowdown) and bootstrapping the supposed | |
366 | # "maximally debuggable" environment (notably libstd) takes | |
367 | # hours to build. | |
368 | # | |
369 | #debug = false | |
370 | ||
6a06907d XL |
371 | # Whether to download the stage 1 and 2 compilers from CI. |
372 | # This is mostly useful for tools; if you have changes to `compiler/` they will be ignored. | |
373 | # | |
cdc7bbd5 | 374 | # You can set this to "if-unchanged" to only download if `compiler/` has not been modified. |
6a06907d XL |
375 | #download-rustc = false |
376 | ||
ea8adc8c XL |
377 | # Number of codegen units to use for each compiler invocation. A value of 0 |
378 | # means "the number of cores on this machine", and 1+ is passed through to the | |
379 | # compiler. | |
1b1a35ee XL |
380 | # |
381 | # Uses the rustc defaults: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units | |
382 | #codegen-units = if incremental { 256 } else { 16 } | |
ea8adc8c | 383 | |
a1dfa0c6 XL |
384 | # Sets the number of codegen units to build the standard library with, |
385 | # regardless of what the codegen-unit setting for the rest of the compiler is. | |
cdc7bbd5 XL |
386 | # NOTE: building with anything other than 1 is known to occasionally have bugs. |
387 | # See https://github.com/rust-lang/rust/issues/83600. | |
388 | #codegen-units-std = codegen-units | |
a1dfa0c6 | 389 | |
ea8adc8c | 390 | # Whether or not debug assertions are enabled for the compiler and standard |
f035d41b XL |
391 | # library. Debug assertions control the maximum log level used by rustc. When |
392 | # enabled calls to `trace!` and `debug!` macros are preserved in the compiled | |
393 | # binary, otherwise they are omitted. | |
394 | # | |
395 | # Defaults to rust.debug value | |
29967ef6 | 396 | #debug-assertions = rust.debug (boolean) |
f9f354fc XL |
397 | |
398 | # Whether or not debug assertions are enabled for the standard library. | |
399 | # Overrides the `debug-assertions` option, if defined. | |
f035d41b XL |
400 | # |
401 | # Defaults to rust.debug-assertions value | |
29967ef6 | 402 | #debug-assertions-std = rust.debug-assertions (boolean) |
1b1a35ee XL |
403 | |
404 | # Whether or not to leave debug! and trace! calls in the rust binary. | |
405 | # Overrides the `debug-assertions` option, if defined. | |
406 | # | |
407 | # Defaults to rust.debug-assertions value | |
29967ef6 XL |
408 | # |
409 | # If you see a message from `tracing` saying | |
410 | # `max_level_info` is enabled and means logging won't be shown, | |
411 | # set this value to `true`. | |
412 | #debug-logging = rust.debug-assertions (boolean) | |
ea8adc8c | 413 | |
dc9dc135 XL |
414 | # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`. |
415 | # `0` - no debug info | |
f035d41b XL |
416 | # `1` - line tables only - sufficient to generate backtraces that include line |
417 | # information and inlined functions, set breakpoints at source code | |
418 | # locations, and step through execution in a debugger. | |
dc9dc135 | 419 | # `2` - full debug info with variable and type information |
74b04a01 | 420 | # Can be overridden for specific subsets of Rust code (rustc, std or tools). |
dc9dc135 XL |
421 | # Debuginfo for tests run with compiletest is not controlled by this option |
422 | # and needs to be enabled separately with `debuginfo-level-tests`. | |
f035d41b | 423 | # |
3dfed10e XL |
424 | # Note that debuginfo-level = 2 generates several gigabytes of debuginfo |
425 | # and will slow down the linking process significantly. | |
426 | # | |
427 | # Defaults to 1 if debug is true | |
f035d41b | 428 | #debuginfo-level = 0 |
ea8adc8c | 429 | |
dc9dc135 | 430 | # Debuginfo level for the compiler. |
cdc7bbd5 | 431 | #debuginfo-level-rustc = debuginfo-level |
ea8adc8c | 432 | |
dc9dc135 | 433 | # Debuginfo level for the standard library. |
cdc7bbd5 | 434 | #debuginfo-level-std = debuginfo-level |
ea8adc8c | 435 | |
dc9dc135 | 436 | # Debuginfo level for the tools. |
cdc7bbd5 | 437 | #debuginfo-level-tools = debuginfo-level |
dc9dc135 XL |
438 | |
439 | # Debuginfo level for the test suites run with compiletest. | |
440 | # FIXME(#61117): Some tests fail when this option is enabled. | |
441 | #debuginfo-level-tests = 0 | |
83c7162d | 442 | |
fc512014 XL |
443 | # Whether to run `dsymutil` on Apple platforms to gather debug info into .dSYM |
444 | # bundles. `dsymutil` adds time to builds for no clear benefit, and also makes | |
445 | # it more difficult for debuggers to find debug info. The compiler currently | |
446 | # defaults to running `dsymutil` to preserve its historical default, but when | |
447 | # compiling the compiler itself, we skip it by default since we know it's safe | |
448 | # to do so in that case. | |
449 | #run-dsymutil = false | |
450 | ||
ea8adc8c XL |
451 | # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE) |
452 | #backtrace = true | |
453 | ||
94b46f34 XL |
454 | # Whether to always use incremental compilation when building rustc |
455 | #incremental = false | |
456 | ||
9fa01778 | 457 | # Build a multi-threaded rustc |
1b1a35ee | 458 | # FIXME(#75760): Some UI tests fail when this option is enabled. |
9fa01778 | 459 | #parallel-compiler = false |
0531ce1d | 460 | |
abe05a73 XL |
461 | # The default linker that will be hard-coded into the generated compiler for |
462 | # targets that don't specify linker explicitly in their target specifications. | |
463 | # Note that this is not the linker used to link said compiler. | |
cdc7bbd5 XL |
464 | # |
465 | # See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information. | |
466 | #default-linker = <none> (path) | |
ea8adc8c | 467 | |
ea8adc8c XL |
468 | # The "channel" for the Rust build to produce. The stable/beta channels only |
469 | # allow using stable features, whereas the nightly and dev channels allow using | |
470 | # nightly features | |
471 | #channel = "dev" | |
472 | ||
fc512014 XL |
473 | # A descriptive string to be appended to `rustc --version` output, which is |
474 | # also used in places like debuginfo `DW_AT_producer`. This may be useful for | |
475 | # supplementary build information, like distro-specific package versions. | |
cdc7bbd5 | 476 | #description = <none> (string) |
fc512014 | 477 | |
cdc7bbd5 XL |
478 | # The root location of the musl installation directory. The library directory |
479 | # will also need to contain libunwind.a for an unwinding implementation. Note | |
480 | # that this option only makes sense for musl targets that produce statically | |
481 | # linked binaries. | |
482 | # | |
483 | # Defaults to /usr on musl hosts. Has no default otherwise. | |
484 | #musl-root = <platform specific> (path) | |
e74abb32 | 485 | |
ea8adc8c XL |
486 | # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix |
487 | # platforms to ensure that the compiler is usable by default from the build | |
488 | # directory (as it links to a number of dynamic libraries). This may not be | |
489 | # desired in distributions, for example. | |
490 | #rpath = true | |
491 | ||
1b1a35ee | 492 | # Prints each test name as it is executed, to help debug issues in the test harness itself. |
94b46f34 | 493 | #verbose-tests = false |
ea8adc8c | 494 | |
dc9dc135 | 495 | # Flag indicating whether tests are compiled with optimizations (the -O flag). |
ea8adc8c | 496 | #optimize-tests = true |
ea8adc8c XL |
497 | |
498 | # Flag indicating whether codegen tests will be run or not. If you get an error | |
499 | # saying that the FileCheck executable is missing, you may want to disable this. | |
0bf4aa26 | 500 | # Also see the target's llvm-filecheck option. |
ea8adc8c XL |
501 | #codegen-tests = true |
502 | ||
503 | # Flag indicating whether git info will be retrieved from .git automatically. | |
504 | # Having the git information can cause a lot of rebuilds during development. | |
2c00a5a8 | 505 | # Note: If this attribute is not explicitly set (e.g. if left commented out) it |
ea8adc8c | 506 | # will default to true if channel = "dev", but will default to false otherwise. |
cdc7bbd5 | 507 | #ignore-git = if channel == "dev" { true } else { false } |
ea8adc8c XL |
508 | |
509 | # When creating source tarballs whether or not to create a source tarball. | |
cdc7bbd5 | 510 | #dist-src = true |
ea8adc8c | 511 | |
ff7c6d11 XL |
512 | # After building or testing extended tools (e.g. clippy and rustfmt), append the |
513 | # result (broken, compiling, testing) into this JSON file. | |
cdc7bbd5 | 514 | #save-toolstates = <none> (path) |
ff7c6d11 | 515 | |
2c00a5a8 XL |
516 | # This is an array of the codegen backends that will be compiled for the rustc |
517 | # that's being compiled. The default is to only build the LLVM codegen backend, | |
29967ef6 | 518 | # and currently the only standard options supported are `"llvm"` and `"cranelift"`. |
2c00a5a8 XL |
519 | #codegen-backends = ["llvm"] |
520 | ||
0531ce1d XL |
521 | # Indicates whether LLD will be compiled and made available in the sysroot for |
522 | # rustc to execute. | |
523 | #lld = false | |
524 | ||
74b04a01 XL |
525 | # Indicates whether LLD will be used to link Rust crates during bootstrap on |
526 | # supported platforms. The LLD from the bootstrap distribution will be used | |
527 | # and not the LLD compiled during the bootstrap. | |
528 | # | |
1b1a35ee | 529 | # LLD will not be used if we're cross linking. |
74b04a01 | 530 | # |
3dfed10e | 531 | # Explicitly setting the linker for a target will override this option when targeting MSVC. |
74b04a01 XL |
532 | #use-lld = false |
533 | ||
8faf50e0 XL |
534 | # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the |
535 | # sysroot. | |
536 | #llvm-tools = false | |
537 | ||
83c7162d XL |
538 | # Whether to deny warnings in crates |
539 | #deny-warnings = true | |
540 | ||
541 | # Print backtrace on internal compiler errors during bootstrap | |
542 | #backtrace-on-ice = false | |
543 | ||
8faf50e0 XL |
544 | # Whether to verify generated LLVM IR |
545 | #verify-llvm-ir = false | |
546 | ||
dfeec247 XL |
547 | # Compile the compiler with a non-default ThinLTO import limit. This import |
548 | # limit controls the maximum size of functions imported by ThinLTO. Decreasing | |
549 | # will make code compile faster at the expense of lower runtime performance. | |
cdc7bbd5 | 550 | #thin-lto-import-instr-limit = if incremental { 10 } else { LLVM default (currently 100) } |
dfeec247 | 551 | |
3dfed10e | 552 | # Map debuginfo paths to `/rust/$sha/...`, generally only set for releases |
b7449926 XL |
553 | #remap-debuginfo = false |
554 | ||
a1dfa0c6 XL |
555 | # Link the compiler against `jemalloc`, where on Linux and OSX it should |
556 | # override the default allocator for rustc and LLVM. | |
557 | #jemalloc = false | |
558 | ||
559 | # Run tests in various test suites with the "nll compare mode" in addition to | |
560 | # running the tests in normal mode. Largely only used on CI and during local | |
561 | # development of NLL | |
562 | #test-compare-mode = false | |
563 | ||
532ac7d7 | 564 | # Use LLVM libunwind as the implementation for Rust's unwinder. |
29967ef6 | 565 | # Accepted values are 'in-tree' (formerly true), 'system' or 'no' (formerly false). |
17df50a5 XL |
566 | # This option only applies for Linux and Fuchsia targets. |
567 | # On Linux target, if crt-static is not enabled, 'no' means dynamic link to | |
568 | # `libgcc_s.so`, 'in-tree' means static link to the in-tree build of llvm libunwind | |
569 | # and 'system' means dynamic link to `libunwind.so`. If crt-static is enabled, | |
136023e0 XL |
570 | # the behavior is depend on the libc. On musl target, 'no' and 'in-tree' both |
571 | # means static link to the in-tree build of llvm libunwind, and 'system' means | |
17df50a5 XL |
572 | # static link to `libunwind.a` provided by system. Due to the limitation of glibc, |
573 | # it must link to `libgcc_eh.a` to get a working output, and this option have no effect. | |
29967ef6 | 574 | #llvm-libunwind = 'no' |
532ac7d7 | 575 | |
74b04a01 XL |
576 | # Enable Windows Control Flow Guard checks in the standard library. |
577 | # This only applies from stage 1 onwards, and only for Windows targets. | |
578 | #control-flow-guard = false | |
579 | ||
3dfed10e XL |
580 | # Enable symbol-mangling-version v0. This can be helpful when profiling rustc, |
581 | # as generics will be preserved in symbols (rather than erased into opaque T). | |
582 | #new-symbol-mangling = false | |
583 | ||
ea8adc8c XL |
584 | # ============================================================================= |
585 | # Options for specific targets | |
586 | # | |
587 | # Each of the following options is scoped to the specific target triple in | |
588 | # question and is used for determining how to compile each target. | |
589 | # ============================================================================= | |
590 | [target.x86_64-unknown-linux-gnu] | |
591 | ||
cdc7bbd5 | 592 | # C compiler to be used to compile C code. Note that the |
ea8adc8c XL |
593 | # default value is platform specific, and if not specified it may also depend on |
594 | # what platform is crossing to what platform. | |
cdc7bbd5 XL |
595 | # See `src/bootstrap/cc_detect.rs` for details. |
596 | #cc = "cc" (path) | |
ea8adc8c | 597 | |
cdc7bbd5 | 598 | # C++ compiler to be used to compile C++ code (e.g. LLVM and our LLVM shims). |
ea8adc8c | 599 | # This is only used for host targets. |
cdc7bbd5 XL |
600 | # See `src/bootstrap/cc_detect.rs` for details. |
601 | #cxx = "c++" (path) | |
ea8adc8c | 602 | |
abe05a73 XL |
603 | # Archiver to be used to assemble static libraries compiled from C/C++ code. |
604 | # Note: an absolute path should be used, otherwise LLVM build will break. | |
cdc7bbd5 | 605 | #ar = "ar" (path) |
abe05a73 | 606 | |
b7449926 XL |
607 | # Ranlib to be used to assemble static libraries compiled from C/C++ code. |
608 | # Note: an absolute path should be used, otherwise LLVM build will break. | |
cdc7bbd5 | 609 | #ranlib = "ranlib" (path) |
b7449926 | 610 | |
cdc7bbd5 | 611 | # Linker to be used to bootstrap Rust code. Note that the |
abe05a73 XL |
612 | # default value is platform specific, and if not specified it may also depend on |
613 | # what platform is crossing to what platform. | |
3dfed10e | 614 | # Setting this will override the `use-lld` option for Rust code when targeting MSVC. |
cdc7bbd5 | 615 | #linker = "cc" (path) |
abe05a73 | 616 | |
ea8adc8c | 617 | # Path to the `llvm-config` binary of the installation of a custom LLVM to link |
2c00a5a8 | 618 | # against. Note that if this is specified we don't compile LLVM at all for this |
ea8adc8c | 619 | # target. |
cdc7bbd5 | 620 | #llvm-config = <none> (path) |
ea8adc8c | 621 | |
0bf4aa26 XL |
622 | # Normally the build system can find LLVM's FileCheck utility, but if |
623 | # not, you can specify an explicit file name for it. | |
cdc7bbd5 | 624 | #llvm-filecheck = "/path/to/llvm-version/bin/FileCheck" |
0bf4aa26 | 625 | |
ea8adc8c XL |
626 | # If this target is for Android, this option will be required to specify where |
627 | # the NDK for the target lives. This is used to find the C compiler to link and | |
628 | # build native code. | |
cdc7bbd5 XL |
629 | # See `src/bootstrap/cc_detect.rs` for details. |
630 | #android-ndk = <none> (path) | |
ea8adc8c | 631 | |
29967ef6 XL |
632 | # Build the sanitizer runtimes for this target. |
633 | # This option will override the same option under [build] section. | |
cdc7bbd5 | 634 | #sanitizers = build.sanitizers (bool) |
29967ef6 XL |
635 | |
636 | # Build the profiler runtime for this target(required when compiling with options that depend | |
637 | # on this runtime, such as `-C profile-generate` or `-Z instrument-coverage`). | |
638 | # This option will override the same option under [build] section. | |
cdc7bbd5 | 639 | #profiler = build.profiler (bool) |
29967ef6 | 640 | |
ea8adc8c XL |
641 | # Force static or dynamic linkage of the standard library for this target. If |
642 | # this target is a host for rustc, this will also affect the linkage of the | |
643 | # compiler itself. This is useful for building rustc on targets that normally | |
644 | # only use static libraries. If unset, the target's default linkage is used. | |
cdc7bbd5 | 645 | #crt-static = <platform-specific> (bool) |
ea8adc8c | 646 | |
f035d41b | 647 | # The root location of the musl installation directory. The library directory |
ea8adc8c | 648 | # will also need to contain libunwind.a for an unwinding implementation. Note |
f035d41b | 649 | # that this option only makes sense for musl targets that produce statically |
cdc7bbd5 XL |
650 | # linked binaries. |
651 | #musl-root = build.musl-root (path) | |
ea8adc8c | 652 | |
f035d41b XL |
653 | # The full path to the musl libdir. |
654 | #musl-libdir = musl-root/lib | |
655 | ||
6a06907d XL |
656 | # The root location of the `wasm32-wasi` sysroot. Only used for the |
657 | # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to | |
658 | # create a `[target.wasm32-wasi]` section and move this field there. | |
cdc7bbd5 | 659 | #wasi-root = <none> (path) |
532ac7d7 | 660 | |
ea8adc8c XL |
661 | # Used in testing for configuring where the QEMU images are located, you |
662 | # probably don't want to use this. | |
cdc7bbd5 | 663 | #qemu-rootfs = <none> (path) |
ea8adc8c XL |
664 | |
665 | # ============================================================================= | |
666 | # Distribution options | |
667 | # | |
668 | # These options are related to distribution, mostly for the Rust project itself. | |
669 | # You probably won't need to concern yourself with any of these options | |
670 | # ============================================================================= | |
671 | [dist] | |
672 | ||
673 | # This is the folder of artifacts that the build system will sign. All files in | |
674 | # this directory will be signed with the default gpg key using the system `gpg` | |
675 | # binary. The `asc` and `sha256` files will all be output into the standard dist | |
676 | # output folder (currently `build/dist`) | |
677 | # | |
678 | # This folder should be populated ahead of time before the build system is | |
679 | # invoked. | |
cdc7bbd5 | 680 | #sign-folder = <none> (path) |
ea8adc8c XL |
681 | |
682 | # The remote address that all artifacts will eventually be uploaded to. The | |
683 | # build system generates manifests which will point to these urls, and for the | |
684 | # manifests to be correct they'll have to have the right URLs encoded. | |
685 | # | |
686 | # Note that this address should not contain a trailing slash as file names will | |
687 | # be appended to it. | |
cdc7bbd5 | 688 | #upload-addr = <none> (URL) |
ea8adc8c XL |
689 | |
690 | # Whether to build a plain source tarball to upload | |
691 | # We disable that on Windows not to override the one already uploaded on S3 | |
692 | # as the one built on Windows will contain backslashes in paths causing problems | |
693 | # on linux | |
694 | #src-tarball = true | |
0bf4aa26 XL |
695 | |
696 | # Whether to allow failures when building tools | |
697 | #missing-tools = false | |
5869c6ff XL |
698 | |
699 | # List of compression formats to use when generating dist tarballs. The list of | |
700 | # formats is provided to rust-installer, which must support all of them. | |
cdc7bbd5 XL |
701 | # |
702 | # This list must be non-empty. | |
5869c6ff | 703 | #compression-formats = ["gz", "xz"] |