]> git.proxmox.com Git - rustc.git/blob - config.example.toml
New upstream version 1.75.0+dfsg1
[rustc.git] / config.example.toml
1 # Sample TOML configuration file for building Rust.
2 #
3 # To configure rustbuild, run `./configure` or `./x.py setup`.
4 # See https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#create-a-configtoml for more information.
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
12 # =============================================================================
13 # Global Settings
14 # =============================================================================
15
16 # Use different pre-set defaults than the global defaults.
17 #
18 # See `src/bootstrap/defaults` for more information.
19 # Note that this has no default value (x.py uses the defaults in `config.example.toml`).
20 #profile = <none>
21
22 # Keeps track of major changes made to this configuration.
23 #
24 # This value also represents ID of the PR that caused major changes. Meaning,
25 # you can visit github.com/rust-lang/rust/pull/{change-id} to check for more details.
26 #
27 # A 'major change' includes any of the following
28 # - A new option
29 # - A change in the default values
30 #
31 # If `change-id` does not match the version that is currently running,
32 # `x.py` will prompt you to update it and check the related PR for more details.
33 change-id = 116881
34
35 # =============================================================================
36 # Tweaking how LLVM is compiled
37 # =============================================================================
38 [llvm]
39
40 # Whether to use Rust CI built LLVM instead of locally building it.
41 #
42 # Unless you're developing for a target where Rust CI doesn't build a compiler
43 # toolchain or changing LLVM locally, you probably want to leave this enabled.
44 #
45 # Set this to `"if-available"` if you are not sure whether you're on a tier 1
46 # target. All tier 1 targets are currently supported;
47 #
48 # We also currently only support this when building LLVM for the build triple.
49 #
50 # Set this to `"if-unchanged"` to only download if the llvm-project have not
51 # been modified. (If there are no changes or if built from tarball source,
52 # the logic is the same as "if-available")
53 #
54 # Note that many of the LLVM options are not currently supported for
55 # downloading. Currently only the "assertions" option can be toggled.
56 #download-ci-llvm = if rust.channel == "dev" { "if-available" } else { false }
57
58 # Indicates whether the LLVM build is a Release or Debug build
59 #optimize = true
60
61 # Indicates whether LLVM should be built with ThinLTO. Note that this will
62 # only succeed if you use clang, lld, llvm-ar, and llvm-ranlib in your C/C++
63 # toolchain (see the `cc`, `cxx`, `linker`, `ar`, and `ranlib` options below).
64 # More info at: https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap
65 #thin-lto = false
66
67 # Indicates whether an LLVM Release build should include debug info
68 #release-debuginfo = false
69
70 # Indicates whether the LLVM assertions are enabled or not
71 # NOTE: When assertions are disabled, bugs in the integration between rustc and LLVM can lead to
72 # unsoundness (segfaults, etc.) in the rustc process itself, not just in the generated code.
73 #assertions = false
74
75 # Indicates whether the LLVM testsuite is enabled in the build or not. Does
76 # not execute the tests as part of the build as part of x.py build et al,
77 # just makes it possible to do `ninja check-llvm` in the staged LLVM build
78 # directory when doing LLVM development as part of Rust development.
79 #tests = false
80
81 # Indicates whether the LLVM plugin is enabled or not
82 #plugins = false
83
84 # Indicates whether ccache is used when building LLVM. Set to `true` to use the first `ccache` in
85 # PATH, or set an absolute path to use a specific version.
86 #ccache = false
87
88 # When true, link libstdc++ statically into the rustc_llvm.
89 # This is useful if you don't want to use the dynamic version of that
90 # library provided by LLVM.
91 #static-libstdcpp = false
92
93 # Whether to use Ninja to build LLVM. This runs much faster than make.
94 #ninja = true
95
96 # LLVM targets to build support for.
97 # Note: this is NOT related to Rust compilation targets. However, as Rust is
98 # dependent on LLVM for code generation, turning targets off here WILL lead to
99 # the resulting rustc being unable to compile for the disabled architectures.
100 #
101 # To add support for new targets, see https://rustc-dev-guide.rust-lang.org/building/new-target.html.
102 #targets = "AArch64;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86"
103
104 # LLVM experimental targets to build support for. These targets are specified in
105 # the same format as above, but since these targets are experimental, they are
106 # not built by default and the experimental Rust compilation targets that depend
107 # on them will not work unless the user opts in to building them.
108 #experimental-targets = "AVR;M68k;CSKY"
109
110 # Cap the number of parallel linker invocations when compiling LLVM.
111 # This can be useful when building LLVM with debug info, which significantly
112 # increases the size of binaries and consequently the memory required by
113 # each linker process.
114 # If set to 0, linker invocations are treated like any other job and
115 # controlled by rustbuild's -j parameter.
116 #link-jobs = 0
117
118 # Whether to build LLVM as a dynamically linked library (as opposed to statically linked).
119 # Under the hood, this passes `--shared` to llvm-config.
120 # NOTE: To avoid performing LTO multiple times, we suggest setting this to `true` when `thin-lto` is enabled.
121 #link-shared = llvm.thin-lto
122
123 # When building llvm, this configures what is being appended to the version.
124 # To use LLVM version as is, provide an empty string.
125 #version-suffix = if rust.channel == "dev" { "-rust-dev" } else { "-rust-$version-$channel" }
126
127 # On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass
128 # with clang-cl, so this is special in that it only compiles LLVM with clang-cl.
129 # Note that this takes a /path/to/clang-cl, not a boolean.
130 #clang-cl = cc
131
132 # Pass extra compiler and linker flags to the LLVM CMake build.
133 #cflags = ""
134 #cxxflags = ""
135 #ldflags = ""
136
137 # Use libc++ when building LLVM instead of libstdc++. This is the default on
138 # platforms already use libc++ as the default C++ library, but this option
139 # allows you to use libc++ even on platforms when it's not. You need to ensure
140 # that your host compiler ships with libc++.
141 #use-libcxx = false
142
143 # The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
144 #use-linker = <none> (path)
145
146 # Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
147 #allow-old-toolchain = false
148
149 # Whether to include the Polly optimizer.
150 #polly = false
151
152 # Whether to build the clang compiler.
153 #clang = false
154
155 # Whether to enable llvm compilation warnings.
156 #enable-warnings = false
157
158 # Custom CMake defines to set when building LLVM.
159 #build-config = {}
160
161 # =============================================================================
162 # General build configuration options
163 # =============================================================================
164 [build]
165
166 # The default stage to use for the `check` subcommand
167 #check-stage = 0
168
169 # The default stage to use for the `doc` subcommand
170 #doc-stage = 0
171
172 # The default stage to use for the `build` subcommand
173 #build-stage = 1
174
175 # The default stage to use for the `test` subcommand
176 #test-stage = 1
177
178 # The default stage to use for the `dist` subcommand
179 #dist-stage = 2
180
181 # The default stage to use for the `install` subcommand
182 #install-stage = 2
183
184 # The default stage to use for the `bench` subcommand
185 #bench-stage = 2
186
187 # Build triple for the pre-compiled snapshot compiler. If `rustc` is set, this must match its host
188 # triple (see `rustc --version --verbose`; cross-compiling the rust build system itself is NOT
189 # supported). If `rustc` is unset, this must be a platform with pre-compiled host tools
190 # (https://doc.rust-lang.org/nightly/rustc/platform-support.html). The current platform must be
191 # able to run binaries of this build triple.
192 #
193 # If `rustc` is present in path, this defaults to the host it was compiled for.
194 # Otherwise, `x.py` will try to infer it from the output of `uname`.
195 # If `uname` is not found in PATH, we assume this is `x86_64-pc-windows-msvc`.
196 # This may be changed in the future.
197 #build = "x86_64-unknown-linux-gnu" (as an example)
198
199 # Which triples to produce a compiler toolchain for. Each of these triples will be bootstrapped from
200 # the build triple themselves. In other words, this is the list of triples for which to build a
201 # compiler that can RUN on that triple.
202 #
203 # Defaults to just the `build` triple.
204 #host = [build.build] (list of triples)
205
206 # Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of these triples will
207 # be bootstrapped from the build triple themselves. In other words, this is the list of triples for
208 # which to build a library that can CROSS-COMPILE to that triple.
209 #
210 # Defaults to `host`. If you set this explicitly, you likely want to add all
211 # host triples to this list as well in order for those host toolchains to be
212 # able to compile programs for their native target.
213 #target = build.host (list of triples)
214
215 # Use this directory to store build artifacts. Paths are relative to the current directory, not to
216 # the root of the repository.
217 #build-dir = "build"
218
219 # Instead of downloading the src/stage0.json version of Cargo specified, use
220 # this Cargo binary instead to build all Rust code
221 # If you set this, you likely want to set `rustc` as well.
222 #cargo = "/path/to/cargo"
223
224 # Instead of downloading the src/stage0.json version of the compiler
225 # specified, use this rustc binary instead as the stage0 snapshot compiler.
226 # If you set this, you likely want to set `cargo` as well.
227 #rustc = "/path/to/rustc"
228
229 # Instead of downloading the src/stage0.json version of rustfmt specified,
230 # use this rustfmt binary instead as the stage0 snapshot rustfmt.
231 #rustfmt = "/path/to/rustfmt"
232
233 # Whether to build documentation by default. If false, rustdoc and
234 # friends will still be compiled but they will not be used to generate any
235 # documentation.
236 #
237 # You can still build documentation when this is disabled by explicitly passing paths,
238 # e.g. `x doc library`.
239 #docs = true
240
241 # Flag to specify whether CSS, JavaScript, and HTML are minified when
242 # docs are generated. JSON is always minified, because it's enormous,
243 # and generated in already-minified form from the beginning.
244 #docs-minification = true
245
246 # Flag to specify whether private items should be included in the library docs.
247 #library-docs-private-items = false
248
249 # Indicate whether to build compiler documentation by default.
250 # You can still build documentation when this is disabled by explicitly passing a path: `x doc compiler`.
251 #compiler-docs = false
252
253 # Indicate whether git submodules are managed and updated automatically.
254 #submodules = true
255
256 # The path to (or name of) the GDB executable to use. This is only used for
257 # executing the debuginfo test suite.
258 #gdb = "gdb"
259
260 # The node.js executable to use. Note that this is only used for the emscripten
261 # target when running tests, otherwise this can be omitted.
262 #nodejs = "node"
263
264 # The npm executable to use. Note that this is used for rustdoc-gui tests,
265 # otherwise this can be omitted.
266 #
267 # Under Windows this should be `npm.cmd` or path to it (verified on nodejs v18.06), or
268 # error will be emitted.
269 #npm = "npm"
270
271 # Python interpreter to use for various tasks throughout the build, notably
272 # rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
273 #
274 # Defaults to the Python interpreter used to execute x.py.
275 #python = "python"
276
277 # The path to the REUSE executable to use. Note that REUSE is not required in
278 # most cases, as our tooling relies on a cached (and shrunk) copy of the
279 # REUSE output present in the git repository and in our source tarballs.
280 #
281 # REUSE is only needed if your changes caused the overall licensing of the
282 # repository to change, and the cached copy has to be regenerated.
283 #
284 # Defaults to the "reuse" command in the system path.
285 #reuse = "reuse"
286
287 # Force Cargo to check that Cargo.lock describes the precise dependency
288 # set that all the Cargo.toml files create, instead of updating it.
289 #locked-deps = false
290
291 # Indicate whether the vendored sources are used for Rust dependencies or not.
292 #
293 # Vendoring requires additional setup. We recommend using the pre-generated source tarballs if you
294 # want to use vendoring. See
295 # https://forge.rust-lang.org/infra/other-installation-methods.html#source-code.
296 #vendor = false
297
298 # Typically the build system will build the Rust compiler twice. The second
299 # compiler, however, will simply use its own libraries to link against. If you
300 # would rather to perform a full bootstrap, compiling the compiler three times,
301 # then you can set this option to true.
302 #
303 # This is only useful for verifying that rustc generates reproducible builds.
304 #full-bootstrap = false
305
306 # Enable a build of the extended Rust tool set which is not only the compiler
307 # but also tools such as Cargo. This will also produce "combined installers"
308 # which are used to install Rust and Cargo together.
309 # The `tools` (check `config.example.toml` to see its default value) option specifies
310 # which tools should be built if `extended = true`.
311 #
312 # This is disabled by default.
313 #extended = false
314
315 # Set of tools to be included in the installation.
316 #
317 # If `extended = false`, the only one of these built by default is rustdoc.
318 #
319 # If `extended = true`, they're all included, with the exception of
320 # rust-demangler which additionally requires `profiler = true` to be set.
321 #
322 # If any enabled tool fails to build, the installation fails.
323 #tools = [
324 # "cargo",
325 # "clippy",
326 # "rustdoc",
327 # "rustfmt",
328 # "rust-analyzer",
329 # "analysis",
330 # "src",
331 # "rust-demangler", # if profiler = true
332 #]
333
334 # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose, 3 == print environment variables on each rustc invocation
335 #verbose = 0
336
337 # Build the sanitizer runtimes
338 #sanitizers = false
339
340 # Build the profiler runtime (required when compiling with options that depend
341 # on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
342 #profiler = false
343
344 # Indicates whether the native libraries linked into Cargo will be statically
345 # linked or not.
346 #cargo-native-static = false
347
348 # Run the build with low priority, by setting the process group's "nice" value
349 # to +10 on Unix platforms, and by using a "low priority" job object on Windows.
350 #low-priority = false
351
352 # Arguments passed to the `./configure` script, used during distcheck. You
353 # probably won't fill this in but rather it's filled in by the `./configure`
354 # script. Useful for debugging.
355 #configure-args = []
356
357 # Indicates that a local rebuild is occurring instead of a full bootstrap,
358 # essentially skipping stage0 as the local compiler is recompiling itself again.
359 # Useful for modifying only the stage2 compiler without having to pass `--keep-stage 0` each time.
360 #local-rebuild = false
361
362 # Print out how long each rustbuild step took (mostly intended for CI and
363 # tracking over time)
364 #print-step-timings = false
365
366 # Print out resource usage data for each rustbuild step, as defined by the Unix
367 # struct rusage. (Note that this setting is completely unstable: the data it
368 # captures, what platforms it supports, the format of its associated output, and
369 # this setting's very existence, are all subject to change.)
370 #print-step-rusage = false
371
372 # Always patch binaries for usage with Nix toolchains. If `true` then binaries
373 # will be patched unconditionally. If `false` or unset, binaries will be patched
374 # only if the current distribution is NixOS. This option is useful when using
375 # a Nix toolchain on non-NixOS distributions.
376 #patch-binaries-for-nix = false
377
378 # Collect information and statistics about the current build and writes it to
379 # disk. Enabling this or not has no impact on the resulting build output. The
380 # schema of the file generated by the build metrics feature is unstable, and
381 # this is not intended to be used during local development.
382 #metrics = false
383
384 # Specify the location of the Android NDK. Used when targeting Android.
385 #android-ndk = "/path/to/android-ndk-r25b"
386
387 # =============================================================================
388 # General install configuration options
389 # =============================================================================
390 [install]
391
392 # Where to install the generated toolchain. Must be an absolute path.
393 #prefix = "/usr/local"
394
395 # Where to install system configuration files.
396 # If this is a relative path, it will get installed in `prefix` above
397 #sysconfdir = "/etc"
398
399 # Where to install documentation in `prefix` above
400 #docdir = "share/doc/rust"
401
402 # Where to install binaries in `prefix` above
403 #bindir = "bin"
404
405 # Where to install libraries in `prefix` above
406 #libdir = "lib"
407
408 # Where to install man pages in `prefix` above
409 #mandir = "share/man"
410
411 # Where to install data in `prefix` above
412 #datadir = "share"
413
414 # =============================================================================
415 # Options for compiling Rust code itself
416 # =============================================================================
417 [rust]
418
419 # Whether or not to optimize when compiling the compiler and standard library,
420 # and what level of optimization to use.
421 # WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,
422 # building without optimizations takes much longer than optimizing. Further, some platforms
423 # fail to build without this optimization (c.f. #65352).
424 # The valid options are:
425 # true - Enable optimizations.
426 # false - Disable optimizations.
427 # 0 - Disable optimizations.
428 # 1 - Basic optimizations.
429 # 2 - Some optimizations.
430 # 3 - All optimizations.
431 # "s" - Optimize for binary size.
432 # "z" - Optimize for binary size, but also turn off loop vectorization.
433 #optimize = true
434
435 # Indicates that the build should be configured for debugging Rust. A
436 # `debug`-enabled compiler and standard library will be somewhat
437 # slower (due to e.g. checking of debug assertions) but should remain
438 # usable.
439 #
440 # Note: If this value is set to `true`, it will affect a number of
441 # configuration options below as well, if they have been left
442 # unconfigured in this file.
443 #
444 # Note: changes to the `debug` setting do *not* affect `optimize`
445 # above. In theory, a "maximally debuggable" environment would
446 # set `optimize` to `false` above to assist the introspection
447 # facilities of debuggers like lldb and gdb. To recreate such an
448 # environment, explicitly set `optimize` to `false` and `debug`
449 # to `true`. In practice, everyone leaves `optimize` set to
450 # `true`, because an unoptimized rustc with debugging
451 # enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
452 # reported a 25x slowdown) and bootstrapping the supposed
453 # "maximally debuggable" environment (notably libstd) takes
454 # hours to build.
455 #
456 #debug = false
457
458 # Whether to download the stage 1 and 2 compilers from CI.
459 # This is mostly useful for tools; if you have changes to `compiler/` or `library/` they will be ignored.
460 #
461 # Set this to "if-unchanged" to only download if the compiler and standard library have not been modified.
462 # Set this to `true` to download unconditionally (useful if e.g. you are only changing doc-comments).
463 #download-rustc = false
464
465 # Number of codegen units to use for each compiler invocation. A value of 0
466 # means "the number of cores on this machine", and 1+ is passed through to the
467 # compiler.
468 #
469 # Uses the rustc defaults: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
470 #codegen-units = if incremental { 256 } else { 16 }
471
472 # Sets the number of codegen units to build the standard library with,
473 # regardless of what the codegen-unit setting for the rest of the compiler is.
474 # NOTE: building with anything other than 1 is known to occasionally have bugs.
475 #codegen-units-std = codegen-units
476
477 # Whether or not debug assertions are enabled for the compiler and standard library.
478 # These can help find bugs at the cost of a small runtime slowdown.
479 #
480 # Defaults to rust.debug value
481 #debug-assertions = rust.debug (boolean)
482
483 # Whether or not debug assertions are enabled for the standard library.
484 # Overrides the `debug-assertions` option, if defined.
485 #
486 # Defaults to rust.debug-assertions value
487 #debug-assertions-std = rust.debug-assertions (boolean)
488
489 # Whether or not to leave debug! and trace! calls in the rust binary.
490 #
491 # Defaults to rust.debug-assertions value
492 #
493 # If you see a message from `tracing` saying "some trace filter directives would enable traces that
494 # are disabled statically" because `max_level_info` is enabled, set this value to `true`.
495 #debug-logging = rust.debug-assertions (boolean)
496
497 # Whether or not overflow checks are enabled for the compiler and standard
498 # library.
499 #
500 # Defaults to rust.debug value
501 #overflow-checks = rust.debug (boolean)
502
503 # Whether or not overflow checks are enabled for the standard library.
504 # Overrides the `overflow-checks` option, if defined.
505 #
506 # Defaults to rust.overflow-checks value
507 #overflow-checks-std = rust.overflow-checks (boolean)
508
509 # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
510 # `0` - no debug info
511 # `1` - line tables only - sufficient to generate backtraces that include line
512 # information and inlined functions, set breakpoints at source code
513 # locations, and step through execution in a debugger.
514 # `2` - full debug info with variable and type information
515 # Can be overridden for specific subsets of Rust code (rustc, std or tools).
516 # Debuginfo for tests run with compiletest is not controlled by this option
517 # and needs to be enabled separately with `debuginfo-level-tests`.
518 #
519 # Note that debuginfo-level = 2 generates several gigabytes of debuginfo
520 # and will slow down the linking process significantly.
521 #debuginfo-level = if rust.debug { 1 } else { 0 }
522
523 # Debuginfo level for the compiler.
524 #debuginfo-level-rustc = rust.debuginfo-level
525
526 # Debuginfo level for the standard library.
527 #debuginfo-level-std = rust.debuginfo-level
528
529 # Debuginfo level for the tools.
530 #debuginfo-level-tools = rust.debuginfo-level
531
532 # Debuginfo level for the test suites run with compiletest.
533 # FIXME(#61117): Some tests fail when this option is enabled.
534 #debuginfo-level-tests = 0
535
536 # Should rustc be build with split debuginfo? Default is platform dependent.
537 # Valid values are the same as those accepted by `-C split-debuginfo`
538 # (`off`/`unpacked`/`packed`).
539 #
540 # On Linux, split debuginfo is disabled by default.
541 #
542 # On Apple platforms, unpacked split debuginfo is used by default. Unpacked
543 # debuginfo does not run `dsymutil`, which packages debuginfo from disparate
544 # object files into a single `.dSYM` file. `dsymutil` adds time to builds for
545 # no clear benefit, and also makes it more difficult for debuggers to find
546 # debug info. The compiler currently defaults to running `dsymutil` to preserve
547 # its historical default, but when compiling the compiler itself, we skip it by
548 # default since we know it's safe to do so in that case.
549 #
550 # On Windows platforms, packed debuginfo is the only supported option,
551 # producing a `.pdb` file.
552 #split-debuginfo = if linux { off } else if windows { packed } else if apple { unpacked }
553
554 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
555 #backtrace = true
556
557 # Whether to always use incremental compilation when building rustc
558 #incremental = false
559
560 # Build a multi-threaded rustc. This allows users to use parallel rustc
561 # via the unstable option `-Z threads=n`.
562 # Since stable/beta channels only allow using stable features,
563 # `parallel-compiler = false` should be set for these channels.
564 #parallel-compiler = true
565
566 # The default linker that will be hard-coded into the generated
567 # compiler for targets that don't specify a default linker explicitly
568 # in their target specifications. Note that this is not the linker
569 # used to link said compiler. It can also be set per-target (via the
570 # `[target.<triple>]` block), which may be useful in a cross-compilation
571 # setting.
572 #
573 # See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information.
574 #default-linker = <none> (path)
575
576 # The "channel" for the Rust build to produce. The stable/beta channels only
577 # allow using stable features, whereas the nightly and dev channels allow using
578 # nightly features
579 #channel = "dev"
580
581 # A descriptive string to be appended to `rustc --version` output, which is
582 # also used in places like debuginfo `DW_AT_producer`. This may be useful for
583 # supplementary build information, like distro-specific package versions.
584 #
585 # The Rust compiler will differentiate between versions of itself, including
586 # based on this string, which means that if you wish to be compatible with
587 # upstream Rust you need to set this to "". However, note that if you are not
588 # actually compatible -- for example if you've backported patches that change
589 # behavior -- this may lead to miscompilations or other bugs.
590 #description = ""
591
592 # The root location of the musl installation directory. The library directory
593 # will also need to contain libunwind.a for an unwinding implementation. Note
594 # that this option only makes sense for musl targets that produce statically
595 # linked binaries.
596 #
597 # Defaults to /usr on musl hosts. Has no default otherwise.
598 #musl-root = <platform specific> (path)
599
600 # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
601 # platforms to ensure that the compiler is usable by default from the build
602 # directory (as it links to a number of dynamic libraries). This may not be
603 # desired in distributions, for example.
604 #rpath = true
605
606 # Prints each test name as it is executed, to help debug issues in the test harness itself.
607 #verbose-tests = false
608
609 # Flag indicating whether tests are compiled with optimizations (the -O flag).
610 #optimize-tests = true
611
612 # Flag indicating whether codegen tests will be run or not. If you get an error
613 # saying that the FileCheck executable is missing, you may want to disable this.
614 # Also see the target's llvm-filecheck option.
615 #codegen-tests = true
616
617 # Flag indicating whether git info will be retrieved from .git automatically.
618 # Having the git information can cause a lot of rebuilds during development.
619 #
620 # FIXME(#76720): this can causes bugs if different compilers reuse the same metadata cache.
621 #omit-git-hash = if rust.channel == "dev" { true } else { false }
622
623 # Whether to create a source tarball by default when running `x dist`.
624 #
625 # You can still build a source tarball when this is disabled by explicitly passing `x dist rustc-src`.
626 #dist-src = true
627
628 # After building or testing an optional component (e.g. the nomicon or reference), append the
629 # result (broken, compiling, testing) into this JSON file.
630 #save-toolstates = <none> (path)
631
632 # This is an array of the codegen backends that will be compiled for the rustc
633 # that's being compiled. The default is to only build the LLVM codegen backend,
634 # and currently the only standard options supported are `"llvm"`, `"cranelift"`
635 # and `"gcc"`. The first backend in this list will be used as default by rustc
636 # when no explicit backend is specified.
637 #codegen-backends = ["llvm"]
638
639 # Indicates whether LLD will be compiled and made available in the sysroot for
640 # rustc to execute.
641 #lld = false
642
643 # Indicates whether LLD will be used to link Rust crates during bootstrap on
644 # supported platforms. The LLD from the bootstrap distribution will be used
645 # and not the LLD compiled during the bootstrap.
646 #
647 # LLD will not be used if we're cross linking.
648 #
649 # Explicitly setting the linker for a target will override this option when targeting MSVC.
650 #use-lld = false
651
652 # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
653 # sysroot.
654 #llvm-tools = false
655
656 # Whether to deny warnings in crates
657 #deny-warnings = true
658
659 # Print backtrace on internal compiler errors during bootstrap
660 #backtrace-on-ice = false
661
662 # Whether to verify generated LLVM IR
663 #verify-llvm-ir = false
664
665 # Compile the compiler with a non-default ThinLTO import limit. This import
666 # limit controls the maximum size of functions imported by ThinLTO. Decreasing
667 # will make code compile faster at the expense of lower runtime performance.
668 #thin-lto-import-instr-limit = if incremental { 10 } else { LLVM default (currently 100) }
669
670 # Map debuginfo paths to `/rust/$sha/...`.
671 # Useful for reproducible builds. Generally only set for releases
672 #remap-debuginfo = false
673
674 # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator.
675 # This option is only tested on Linux and OSX.
676 #jemalloc = false
677
678 # Run tests in various test suites with the "nll compare mode" in addition to
679 # running the tests in normal mode. Largely only used on CI and during local
680 # development of NLL
681 #test-compare-mode = false
682
683 # Global default for llvm-libunwind for all targets. See the target-specific
684 # documentation for llvm-libunwind below. Note that the target-specific
685 # option will override this if set.
686 #llvm-libunwind = 'no'
687
688 # Enable Windows Control Flow Guard checks in the standard library.
689 # This only applies from stage 1 onwards, and only for Windows targets.
690 #control-flow-guard = false
691
692 # Enable symbol-mangling-version v0. This can be helpful when profiling rustc,
693 # as generics will be preserved in symbols (rather than erased into opaque T).
694 # When no setting is given, the new scheme will be used when compiling the
695 # compiler and its tools and the legacy scheme will be used when compiling the
696 # standard library.
697 # If an explicit setting is given, it will be used for all parts of the codebase.
698 #new-symbol-mangling = true|false (see comment)
699
700 # Select LTO mode that will be used for compiling rustc. By default, thin local LTO
701 # (LTO within a single crate) is used (like for any Rust crate). You can also select
702 # "thin" or "fat" to apply Thin/Fat LTO to the `rustc_driver` dylib, or "off" to disable
703 # LTO entirely.
704 #lto = "thin-local"
705
706 # Build compiler with the optimization enabled and -Zvalidate-mir, currently only for `std`
707 #validate-mir-opts = 3
708
709 # =============================================================================
710 # Options for specific targets
711 #
712 # Each of the following options is scoped to the specific target triple in
713 # question and is used for determining how to compile each target.
714 # =============================================================================
715 [target.x86_64-unknown-linux-gnu]
716
717 # C compiler to be used to compile C code. Note that the
718 # default value is platform specific, and if not specified it may also depend on
719 # what platform is crossing to what platform.
720 # See `src/bootstrap/cc_detect.rs` for details.
721 #cc = "cc" (path)
722
723 # C++ compiler to be used to compile C++ code (e.g. LLVM and our LLVM shims).
724 # This is only used for host targets.
725 # See `src/bootstrap/cc_detect.rs` for details.
726 #cxx = "c++" (path)
727
728 # Archiver to be used to assemble static libraries compiled from C/C++ code.
729 # Note: an absolute path should be used, otherwise LLVM build will break.
730 #ar = "ar" (path)
731
732 # Ranlib to be used to assemble static libraries compiled from C/C++ code.
733 # Note: an absolute path should be used, otherwise LLVM build will break.
734 #ranlib = "ranlib" (path)
735
736 # Linker to be used to bootstrap Rust code. Note that the
737 # default value is platform specific, and if not specified it may also depend on
738 # what platform is crossing to what platform.
739 # Setting this will override the `use-lld` option for Rust code when targeting MSVC.
740 #linker = "cc" (path)
741
742 # Path to the `llvm-config` binary of the installation of a custom LLVM to link
743 # against. Note that if this is specified we don't compile LLVM at all for this
744 # target.
745 #llvm-config = <none> (path)
746
747 # Override detection of whether this is a Rust-patched LLVM. This would be used
748 # in conjunction with either an llvm-config or build.submodules = false.
749 #llvm-has-rust-patches = if llvm-config { false } else { true }
750
751 # Normally the build system can find LLVM's FileCheck utility, but if
752 # not, you can specify an explicit file name for it.
753 #llvm-filecheck = "/path/to/llvm-version/bin/FileCheck"
754
755 # Use LLVM libunwind as the implementation for Rust's unwinder.
756 # Accepted values are 'in-tree' (formerly true), 'system' or 'no' (formerly false).
757 # This option only applies for Linux and Fuchsia targets.
758 # On Linux target, if crt-static is not enabled, 'no' means dynamic link to
759 # `libgcc_s.so`, 'in-tree' means static link to the in-tree build of llvm libunwind
760 # and 'system' means dynamic link to `libunwind.so`. If crt-static is enabled,
761 # the behavior is depend on the libc. On musl target, 'no' and 'in-tree' both
762 # means static link to the in-tree build of llvm libunwind, and 'system' means
763 # static link to `libunwind.a` provided by system. Due to the limitation of glibc,
764 # it must link to `libgcc_eh.a` to get a working output, and this option have no effect.
765 #llvm-libunwind = 'no' if Linux, 'in-tree' if Fuchsia
766
767 # Build the sanitizer runtimes for this target.
768 # This option will override the same option under [build] section.
769 #sanitizers = build.sanitizers (bool)
770
771 # When true, build the profiler runtime for this target (required when compiling
772 # with options that depend on this runtime, such as `-C profile-generate` or
773 # `-C instrument-coverage`). This may also be given a path to an existing build
774 # of the profiling runtime library from LLVM's compiler-rt.
775 # This option will override the same option under [build] section.
776 #profiler = build.profiler (bool)
777
778 # This option supports enable `rpath` in each target independently,
779 # and will override the same option under [rust] section. It only works on Unix platforms
780 #rpath = rust.rpath (bool)
781
782 # Force static or dynamic linkage of the standard library for this target. If
783 # this target is a host for rustc, this will also affect the linkage of the
784 # compiler itself. This is useful for building rustc on targets that normally
785 # only use static libraries. If unset, the target's default linkage is used.
786 #crt-static = <platform-specific> (bool)
787
788 # The root location of the musl installation directory. The library directory
789 # will also need to contain libunwind.a for an unwinding implementation. Note
790 # that this option only makes sense for musl targets that produce statically
791 # linked binaries.
792 #musl-root = build.musl-root (path)
793
794 # The full path to the musl libdir.
795 #musl-libdir = musl-root/lib
796
797 # The root location of the `wasm32-wasi` sysroot. Only used for the
798 # `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
799 # create a `[target.wasm32-wasi]` section and move this field there.
800 #wasi-root = <none> (path)
801
802 # Used in testing for configuring where the QEMU images are located, you
803 # probably don't want to use this.
804 #qemu-rootfs = <none> (path)
805
806 # Skip building the `std` library for this target. Enabled by default for
807 # target triples containing `-none`, `nvptx`, `switch`, or `-uefi`.
808 #no-std = <platform-specific> (bool)
809
810 # =============================================================================
811 # Distribution options
812 #
813 # These options are related to distribution, mostly for the Rust project itself.
814 # You probably won't need to concern yourself with any of these options
815 # =============================================================================
816 [dist]
817
818 # This is the folder of artifacts that the build system will sign. All files in
819 # this directory will be signed with the default gpg key using the system `gpg`
820 # binary. The `asc` and `sha256` files will all be output into the standard dist
821 # output folder (currently `build/dist`)
822 #
823 # This folder should be populated ahead of time before the build system is
824 # invoked.
825 #sign-folder = <none> (path)
826
827 # The remote address that all artifacts will eventually be uploaded to. The
828 # build system generates manifests which will point to these urls, and for the
829 # manifests to be correct they'll have to have the right URLs encoded.
830 #
831 # Note that this address should not contain a trailing slash as file names will
832 # be appended to it.
833 #upload-addr = <none> (URL)
834
835 # Whether to build a plain source tarball to upload
836 # We disable that on Windows not to override the one already uploaded on S3
837 # as the one built on Windows will contain backslashes in paths causing problems
838 # on linux
839 #src-tarball = true
840
841 # Whether to allow failures when building tools
842 #missing-tools = false
843
844 # List of compression formats to use when generating dist tarballs. The list of
845 # formats is provided to rust-installer, which must support all of them.
846 #
847 # This list must be non-empty.
848 #compression-formats = ["gz", "xz"]
849
850 # How much time should be spent compressing the tarballs. The better the
851 # compression profile, the longer compression will take.
852 #
853 # Available options: fast, balanced, best
854 #compression-profile = "fast"
855
856 # Copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain.
857 # Only applies when the host or target is pc-windows-gnu.
858 #include-mingw-linker = true