@@ -112,6 +112,7 @@ changelog-seen = 2
112112
113113# When invoking `llvm-config` this configures whether the `--shared` argument is
114114# passed to prefer linking to shared libraries.
115+ # NOTE: `thin-lto = true` requires this to be `true` and will give an error otherwise.
115116# link-shared = false
116117
117118# When building llvm, this configures what is being appended to the version.
@@ -120,22 +121,23 @@ changelog-seen = 2
120121# version-suffix = "-rust-dev"
121122
122123# On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass
123- # with clang-cl, so this is special in that it only compiles LLVM with clang-cl
124- # clang-cl = '/path/to/clang-cl.exe'
124+ # with clang-cl, so this is special in that it only compiles LLVM with clang-cl.
125+ # Note that this takes a /path/to/clang-cl, not a boolean.
126+ # clang-cl = cc
125127
126128# Pass extra compiler and linker flags to the LLVM CMake build.
127- # cflags = "-fextra-flag "
128- # cxxflags = "-fextra-flag "
129- # ldflags = "-Wl,extra-flag "
129+ # cflags = ""
130+ # cxxflags = ""
131+ # ldflags = ""
130132
131133# Use libc++ when building LLVM instead of libstdc++. This is the default on
132134# platforms already use libc++ as the default C++ library, but this option
133135# allows you to use libc++ even on platforms when it's not. You need to ensure
134136# that your host compiler ships with libc++.
135- # use-libcxx = true
137+ # use-libcxx = false
136138
137139# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
138- # use-linker = "lld"
140+ # use-linker = <none> (path)
139141
140142# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
141143# allow-old-toolchain = false
@@ -147,6 +149,9 @@ changelog-seen = 2
147149# General build configuration options
148150# =============================================================================
149151[build ]
152+ # The default stage to use for the `check` subcommand
153+ # check-stage = 0
154+
150155# The default stage to use for the `doc` subcommand
151156# doc-stage = 0
152157
@@ -170,38 +175,38 @@ changelog-seen = 2
170175# binaries of this build triple and the nightly will be used to bootstrap the
171176# first compiler.
172177#
173- # Defaults to host platform
174- # build = "x86_64-unknown-linux-gnu"
178+ # Defaults to platform where `x.py` is run.
179+ # build = "x86_64-unknown-linux-gnu" (as an example)
175180
176181# Which triples to produce a compiler toolchain for. Each of these triples will
177182# be bootstrapped from the build triple themselves.
178183#
179- # Defaults to just the build triple
180- # host = ["x86_64-unknown-linux-gnu"]
184+ # Defaults to just the build triple.
185+ # host = ["x86_64-unknown-linux-gnu"] (as an example)
181186
182187# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of
183188# these triples will be bootstrapped from the build triple themselves.
184189#
185190# Defaults to `host`. If you set this explicitly, you likely want to add all
186191# host triples to this list as well in order for those host toolchains to be
187192# able to compile programs for their native target.
188- # target = ["x86_64-unknown-linux-gnu"]
193+ # target = ["x86_64-unknown-linux-gnu"] (as an example)
189194
190195# Use this directory to store build artifacts.
191196# You can use "$ROOT" to indicate the root of the git repository.
192197# build-dir = "build"
193198
194199# Instead of downloading the src/stage0.txt version of Cargo specified, use
195200# this Cargo binary instead to build all Rust code
196- # cargo = "/path/to/bin/ cargo"
201+ # cargo = "/path/to/cargo"
197202
198203# Instead of downloading the src/stage0.txt version of the compiler
199204# specified, use this rustc binary instead as the stage0 snapshot compiler.
200- # rustc = "/path/to/bin/ rustc"
205+ # rustc = "/path/to/rustc"
201206
202207# Instead of download the src/stage0.txt version of rustfmt specified,
203208# use this rustfmt binary instead as the stage0 snapshot rustfmt.
204- # rustfmt = "/path/to/bin/ rustfmt"
209+ # rustfmt = "/path/to/rustfmt"
205210
206211# Flag to specify whether any documentation is built. If false, rustdoc and
207212# friends will still be compiled but they will not be used to generate any
@@ -325,16 +330,9 @@ changelog-seen = 2
325330# Where to install man pages in `prefix` above
326331# mandir = "share/man"
327332
328- # Where to install data in `prefix` above (currently unused)
333+ # Where to install data in `prefix` above
329334# datadir = "share"
330335
331- # Where to install additional info in `prefix` above (currently unused)
332- # infodir = "share/info"
333-
334- # Where to install local state (currently unused)
335- # If this is a relative path, it will get installed in `prefix` above
336- # localstatedir = "/var/lib"
337-
338336# =============================================================================
339337# Options for compiling Rust code itself
340338# =============================================================================
@@ -384,7 +382,9 @@ changelog-seen = 2
384382
385383# Sets the number of codegen units to build the standard library with,
386384# regardless of what the codegen-unit setting for the rest of the compiler is.
387- # codegen-units-std = 1
385+ # NOTE: building with anything other than 1 is known to occasionally have bugs.
386+ # See https://github.com/rust-lang/rust/issues/83600.
387+ # codegen-units-std = codegen-units
388388
389389# Whether or not debug assertions are enabled for the compiler and standard
390390# library. Debug assertions control the maximum log level used by rustc. When
@@ -427,19 +427,13 @@ changelog-seen = 2
427427# debuginfo-level = 0
428428
429429# Debuginfo level for the compiler.
430- #
431- # Defaults to rust.debuginfo-level value
432- # debuginfo-level-rustc = 0
430+ # debuginfo-level-rustc = debuginfo-level
433431
434432# Debuginfo level for the standard library.
435- #
436- # Defaults to rust.debuginfo-level value
437- # debuginfo-level-std = 0
433+ # debuginfo-level-std = debuginfo-level
438434
439435# Debuginfo level for the tools.
440- #
441- # Defaults to rust.debuginfo-level value
442- # debuginfo-level-tools = 0
436+ # debuginfo-level-tools = debuginfo-level
443437
444438# Debuginfo level for the test suites run with compiletest.
445439# FIXME(#61117): Some tests fail when this option is enabled.
@@ -466,7 +460,9 @@ changelog-seen = 2
466460# The default linker that will be hard-coded into the generated compiler for
467461# targets that don't specify linker explicitly in their target specifications.
468462# Note that this is not the linker used to link said compiler.
469- # default-linker = "cc"
463+ #
464+ # See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information.
465+ # default-linker = <none> (path)
470466
471467# The "channel" for the Rust build to produce. The stable/beta channels only
472468# allow using stable features, whereas the nightly and dev channels allow using
@@ -476,10 +472,15 @@ changelog-seen = 2
476472# A descriptive string to be appended to `rustc --version` output, which is
477473# also used in places like debuginfo `DW_AT_producer`. This may be useful for
478474# supplementary build information, like distro-specific package versions.
479- # description = ""
475+ # description = <none> (string)
480476
481- # The root location of the musl installation directory.
482- # musl-root = "..."
477+ # The root location of the musl installation directory. The library directory
478+ # will also need to contain libunwind.a for an unwinding implementation. Note
479+ # that this option only makes sense for musl targets that produce statically
480+ # linked binaries.
481+ #
482+ # Defaults to /usr on musl hosts. Has no default otherwise.
483+ # musl-root = <platform specific> (path)
483484
484485# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
485486# platforms to ensure that the compiler is usable by default from the build
@@ -502,14 +503,14 @@ changelog-seen = 2
502503# Having the git information can cause a lot of rebuilds during development.
503504# Note: If this attribute is not explicitly set (e.g. if left commented out) it
504505# will default to true if channel = "dev", but will default to false otherwise.
505- # ignore-git = true
506+ # ignore-git = if channel == "dev" { true } else { false }
506507
507508# When creating source tarballs whether or not to create a source tarball.
508- # dist-src = false
509+ # dist-src = true
509510
510511# After building or testing extended tools (e.g. clippy and rustfmt), append the
511512# result (broken, compiling, testing) into this JSON file.
512- # save-toolstates = "/ path/to/toolstates.json"
513+ # save-toolstates = <none> ( path)
513514
514515# This is an array of the codegen backends that will be compiled for the rustc
515516# that's being compiled. The default is to only build the LLVM codegen backend,
@@ -545,9 +546,7 @@ changelog-seen = 2
545546# Compile the compiler with a non-default ThinLTO import limit. This import
546547# limit controls the maximum size of functions imported by ThinLTO. Decreasing
547548# will make code compile faster at the expense of lower runtime performance.
548- # If `incremental` is set to true above, the import limit will default to 10
549- # instead of LLVM's default of 100.
550- # thin-lto-import-instr-limit = 100
549+ # thin-lto-import-instr-limit = if incremental { 10 } else { LLVM default (currently 100) }
551550
552551# Map debuginfo paths to `/rust/$sha/...`, generally only set for releases
553552# remap-debuginfo = false
@@ -581,75 +580,78 @@ changelog-seen = 2
581580# =============================================================================
582581[target .x86_64-unknown-linux-gnu ]
583582
584- # C compiler to be used to compiler C code. Note that the
583+ # C compiler to be used to compile C code. Note that the
585584# default value is platform specific, and if not specified it may also depend on
586585# what platform is crossing to what platform.
587- # cc = "cc"
586+ # See `src/bootstrap/cc_detect.rs` for details.
587+ # cc = "cc" (path)
588588
589- # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
589+ # C++ compiler to be used to compile C++ code (e.g. LLVM and our LLVM shims).
590590# This is only used for host targets.
591- # cxx = "c++"
591+ # See `src/bootstrap/cc_detect.rs` for details.
592+ # cxx = "c++" (path)
592593
593594# Archiver to be used to assemble static libraries compiled from C/C++ code.
594595# Note: an absolute path should be used, otherwise LLVM build will break.
595- # ar = "ar"
596+ # ar = "ar" (path)
596597
597598# Ranlib to be used to assemble static libraries compiled from C/C++ code.
598599# Note: an absolute path should be used, otherwise LLVM build will break.
599- # ranlib = "ranlib"
600+ # ranlib = "ranlib" (path)
600601
601- # Linker to be used to link Rust code. Note that the
602+ # Linker to be used to bootstrap Rust code. Note that the
602603# default value is platform specific, and if not specified it may also depend on
603604# what platform is crossing to what platform.
604605# Setting this will override the `use-lld` option for Rust code when targeting MSVC.
605- # linker = "cc"
606+ # linker = "cc" (path)
606607
607608# Path to the `llvm-config` binary of the installation of a custom LLVM to link
608609# against. Note that if this is specified we don't compile LLVM at all for this
609610# target.
610- # llvm-config = "../ path/to/llvm/root/bin/llvm-config"
611+ # llvm-config = <none> ( path)
611612
612613# Normally the build system can find LLVM's FileCheck utility, but if
613614# not, you can specify an explicit file name for it.
614- # llvm-filecheck = "/path/to/FileCheck"
615+ # llvm-filecheck = "/path/to/llvm-version/bin/ FileCheck"
615616
616617# If this target is for Android, this option will be required to specify where
617618# the NDK for the target lives. This is used to find the C compiler to link and
618619# build native code.
619- # android-ndk = "/path/to/ndk"
620+ # See `src/bootstrap/cc_detect.rs` for details.
621+ # android-ndk = <none> (path)
620622
621623# Build the sanitizer runtimes for this target.
622624# This option will override the same option under [build] section.
623- # sanitizers = false
625+ # sanitizers = build.sanitizers (bool)
624626
625627# Build the profiler runtime for this target(required when compiling with options that depend
626628# on this runtime, such as `-C profile-generate` or `-Z instrument-coverage`).
627629# This option will override the same option under [build] section.
628- # profiler = false
630+ # profiler = build.profiler (bool)
629631
630632# Force static or dynamic linkage of the standard library for this target. If
631633# this target is a host for rustc, this will also affect the linkage of the
632634# compiler itself. This is useful for building rustc on targets that normally
633635# only use static libraries. If unset, the target's default linkage is used.
634- # crt-static = false
636+ # crt-static = <platform-specific> (bool)
635637
636638# The root location of the musl installation directory. The library directory
637639# will also need to contain libunwind.a for an unwinding implementation. Note
638640# that this option only makes sense for musl targets that produce statically
639- # linked binaries
640- # musl-root = "..."
641+ # linked binaries.
642+ # musl-root = build.musl-root (path)
641643
642644# The full path to the musl libdir.
643645# musl-libdir = musl-root/lib
644646
645647# The root location of the `wasm32-wasi` sysroot. Only used for the
646648# `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
647649# create a `[target.wasm32-wasi]` section and move this field there.
648- # wasi-root = "..."
650+ # wasi-root = <none> (path)
649651
650652# Used in testing for configuring where the QEMU images are located, you
651653# probably don't want to use this.
652- # qemu-rootfs = "..."
654+ # qemu-rootfs = <none> (path)
653655
654656# =============================================================================
655657# Distribution options
@@ -666,31 +668,27 @@ changelog-seen = 2
666668#
667669# This folder should be populated ahead of time before the build system is
668670# invoked.
669- # sign-folder = "path/to/folder/to/sign"
670-
671- # This is a file which contains the password of the default gpg key. This will
672- # be passed to `gpg` down the road when signing all files in `sign-folder`
673- # above. This should be stored in plaintext.
674- # gpg-password-file = "path/to/gpg/password"
671+ # sign-folder = <none> (path)
675672
676673# The remote address that all artifacts will eventually be uploaded to. The
677674# build system generates manifests which will point to these urls, and for the
678675# manifests to be correct they'll have to have the right URLs encoded.
679676#
680677# Note that this address should not contain a trailing slash as file names will
681678# be appended to it.
682- # upload-addr = "https://example.com/folder"
679+ # upload-addr = <none> (URL)
683680
684681# Whether to build a plain source tarball to upload
685682# We disable that on Windows not to override the one already uploaded on S3
686683# as the one built on Windows will contain backslashes in paths causing problems
687684# on linux
688685# src-tarball = true
689- #
690686
691687# Whether to allow failures when building tools
692688# missing-tools = false
693689
694690# List of compression formats to use when generating dist tarballs. The list of
695691# formats is provided to rust-installer, which must support all of them.
692+ #
693+ # This list must be non-empty.
696694# compression-formats = ["gz", "xz"]
0 commit comments