1 # Sample TOML configuration file for building Rust.
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.
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
12 # =============================================================================
14 # =============================================================================
16 # Use different pre-set defaults than the global defaults.
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`).
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.
28 # =============================================================================
29 # Tweaking how LLVM is compiled
30 # =============================================================================
33 # Whether to use Rust CI built LLVM instead of locally building it.
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.
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.
41 # We also currently only support this when building LLVM for the build triple.
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 }
47 # Indicates whether the LLVM build is a Release or Debug build
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
56 # Indicates whether an LLVM Release build should include debug info
57 #release-debuginfo = false
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.
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.
70 # Indicates whether the LLVM plugin is enabled or not
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.
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
82 # Whether to use Ninja to build LLVM. This runs much faster than make.
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.
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"
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"
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.
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
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" }
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.
121 # Pass extra compiler and linker flags to the LLVM CMake build.
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++.
132 # The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
133 #use-linker = <none> (path)
135 # Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
136 #allow-old-toolchain = false
138 # Whether to include the Polly optimizer.
141 # Whether to build the clang compiler.
144 # Whether to enable llvm compilation warnings.
145 #enable-warnings = false
147 # Custom CMake defines to set when building LLVM.
150 # =============================================================================
151 # General build configuration options
152 # =============================================================================
155 # The default stage to use for the `check` subcommand
158 # The default stage to use for the `doc` subcommand
161 # The default stage to use for the `build` subcommand
164 # The default stage to use for the `test` subcommand
167 # The default stage to use for the `dist` subcommand
170 # The default stage to use for the `install` subcommand
173 # The default stage to use for the `bench` subcommand
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.
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)
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.
192 # Defaults to just the `build` triple.
193 #host = [build.build] (list of triples)
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.
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)
204 # Use this directory to store build artifacts. Paths are relative to the current directory, not to
205 # the root of the repository.
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"
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"
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"
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
226 # You can still build documentation when this is disabled by explicitly passing paths,
227 # e.g. `x doc library`.
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
235 # Flag to specify whether private items should be included in the library docs.
236 #library-docs-private-items = false
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
242 # Indicate whether git submodules are managed and updated automatically.
245 # The path to (or name of) the GDB executable to use. This is only used for
246 # executing the debuginfo test suite.
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.
253 # The npm executable to use. Note that this is used for rustdoc-gui tests,
254 # otherwise this can be omitted.
256 # Under Windows this should be `npm.cmd` or path to it (verified on nodejs v18.06), or
257 # error will be emitted.
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.
263 # Defaults to the Python interpreter used to execute x.py.
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.
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.
273 # Defaults to the "reuse" command in the system path.
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.
280 # Indicate whether the vendored sources are used for Rust dependencies or not.
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.
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.
292 # This is only useful for verifying that rustc generates reproducible builds.
293 #full-bootstrap = false
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`.
302 # Set of tools to be included in the installation.
304 # If `extended = false`, the only one of these built by default is rustdoc.
306 # If `extended = true`, they're all included, with the exception of
307 # rust-demangler which additionally requires `profiler = true` to be set.
309 # If any enabled tool fails to build, the installation fails.
318 # "rust-demangler", # if profiler = true
321 # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose, 3 == print environment variables on each rustc invocation
324 # Build the sanitizer runtimes
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`).
331 # Indicates whether the native libraries linked into Cargo will be statically
333 #cargo-native-static = false
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
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.
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
349 # Print out how long each rustbuild step took (mostly intended for CI and
350 # tracking over time)
351 #print-step-timings = false
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
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
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.
371 # =============================================================================
372 # General install configuration options
373 # =============================================================================
376 # Where to install the generated toolchain. Must be an absolute path.
377 #prefix = "/usr/local"
379 # Where to install system configuration files.
380 # If this is a relative path, it will get installed in `prefix` above
383 # Where to install documentation in `prefix` above
384 #docdir = "share/doc/rust"
386 # Where to install binaries in `prefix` above
389 # Where to install libraries in `prefix` above
392 # Where to install man pages in `prefix` above
393 #mandir = "share/man"
395 # Where to install data in `prefix` above
398 # =============================================================================
399 # Options for compiling Rust code itself
400 # =============================================================================
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).
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
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.
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
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.
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
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
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 }
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
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.
455 # Defaults to rust.debug value
456 #debug-assertions = rust.debug (boolean)
458 # Whether or not debug assertions are enabled for the standard library.
459 # Overrides the `debug-assertions` option, if defined.
461 # Defaults to rust.debug-assertions value
462 #debug-assertions-std = rust.debug-assertions (boolean)
464 # Whether or not to leave debug! and trace! calls in the rust binary.
466 # Defaults to rust.debug-assertions value
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)
472 # Whether or not overflow checks are enabled for the compiler and standard
475 # Defaults to rust.debug value
476 #overflow-checks = rust.debug (boolean)
478 # Whether or not overflow checks are enabled for the standard library.
479 # Overrides the `overflow-checks` option, if defined.
481 # Defaults to rust.overflow-checks value
482 #overflow-checks-std = rust.overflow-checks (boolean)
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`.
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 }
498 # Debuginfo level for the compiler.
499 #debuginfo-level-rustc = rust.debuginfo-level
501 # Debuginfo level for the standard library.
502 #debuginfo-level-std = rust.debuginfo-level
504 # Debuginfo level for the tools.
505 #debuginfo-level-tools = rust.debuginfo-level
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
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`).
515 # On Linux, split debuginfo is disabled by default.
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.
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 }
529 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
532 # Whether to always use incremental compilation when building rustc
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
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
547 # See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information.
548 #default-linker = <none> (path)
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
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.
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.
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
571 # Defaults to /usr on musl hosts. Has no default otherwise.
572 #musl-root = <platform specific> (path)
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.
580 # Prints each test name as it is executed, to help debug issues in the test harness itself.
581 #verbose-tests = false
583 # Flag indicating whether tests are compiled with optimizations (the -O flag).
584 #optimize-tests = true
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
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.
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 }
597 # Whether to create a source tarball by default when running `x dist`.
599 # You can still build a source tarball when this is disabled by explicitly passing `x dist rustc-src`.
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)
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"]
613 # Indicates whether LLD will be compiled and made available in the sysroot for
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.
621 # LLD will not be used if we're cross linking.
623 # Explicitly setting the linker for a target will override this option when targeting MSVC.
626 # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
630 # Whether to deny warnings in crates
631 #deny-warnings = true
633 # Print backtrace on internal compiler errors during bootstrap
634 #backtrace-on-ice = false
636 # Whether to verify generated LLVM IR
637 #verify-llvm-ir = false
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) }
644 # Map debuginfo paths to `/rust/$sha/...`.
645 # Useful for reproducible builds. Generally only set for releases
646 #remap-debuginfo = false
648 # Link the compiler and LLVM against `jemalloc` instead of the default libc allocator.
649 # This option is only tested on Linux and OSX.
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
655 #test-compare-mode = false
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'
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
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
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)
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
680 # Build compiler with the optimization enabled and -Zvalidate-mir, currently only for `std`
681 #validate-mir-opts = 3
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
687 # =============================================================================
688 # Options for specific targets
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]
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.
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.
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.
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)
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)
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
723 #llvm-config = <none> (path)
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 }
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"
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
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
748 # See `src/bootstrap/cc_detect.rs` for details.
749 #android-ndk = <none> (path)
751 # Build the sanitizer runtimes for this target.
752 # This option will override the same option under [build] section.
753 #sanitizers = build.sanitizers (bool)
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)
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)
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)
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
774 #musl-root = build.musl-root (path)
776 # The full path to the musl libdir.
777 #musl-libdir = musl-root/lib
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)
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)
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)
792 # =============================================================================
793 # Distribution options
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 # =============================================================================
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`)
805 # This folder should be populated ahead of time before the build system is
807 #sign-folder = <none> (path)
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.
813 # Note that this address should not contain a trailing slash as file names will
815 #upload-addr = <none> (URL)
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
823 # Whether to allow failures when building tools
824 #missing-tools = false
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.
829 # This list must be non-empty.
830 #compression-formats = ["gz", "xz"]
832 # How much time should be spent compressing the tarballs. The better the
833 # compression profile, the longer compression will take.
835 # Available options: fast, balanced, best
836 #compression-profile = "fast"