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