@@ -112,6 +112,7 @@ changelog-seen = 2
112
112
113
113
# When invoking `llvm-config` this configures whether the `--shared` argument is
114
114
# passed to prefer linking to shared libraries.
115
+ # NOTE: `thin-lto = true` requires this to be `true` and will give an error otherwise.
115
116
#link-shared = false
116
117
117
118
# When building llvm, this configures what is being appended to the version.
@@ -120,22 +121,23 @@ changelog-seen = 2
120
121
#version-suffix = "-rust-dev"
121
122
122
123
# 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
125
127
126
128
# 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 = ""
130
132
131
133
# Use libc++ when building LLVM instead of libstdc++. This is the default on
132
134
# platforms already use libc++ as the default C++ library, but this option
133
135
# allows you to use libc++ even on platforms when it's not. You need to ensure
134
136
# that your host compiler ships with libc++.
135
- #use-libcxx = true
137
+ #use-libcxx = false
136
138
137
139
# The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
138
- #use-linker = "lld"
140
+ #use-linker = <none> (path)
139
141
140
142
# Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
141
143
#allow-old-toolchain = false
@@ -147,6 +149,9 @@ changelog-seen = 2
147
149
# General build configuration options
148
150
# =============================================================================
149
151
[build]
152
+ # The default stage to use for the `check` subcommand
153
+ #check-stage = 0
154
+
150
155
# The default stage to use for the `doc` subcommand
151
156
#doc-stage = 0
152
157
@@ -170,38 +175,38 @@ changelog-seen = 2
170
175
# binaries of this build triple and the nightly will be used to bootstrap the
171
176
# first compiler.
172
177
#
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)
175
180
176
181
# Which triples to produce a compiler toolchain for. Each of these triples will
177
182
# be bootstrapped from the build triple themselves.
178
183
#
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)
181
186
182
187
# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of
183
188
# these triples will be bootstrapped from the build triple themselves.
184
189
#
185
190
# Defaults to `host`. If you set this explicitly, you likely want to add all
186
191
# host triples to this list as well in order for those host toolchains to be
187
192
# 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)
189
194
190
195
# Use this directory to store build artifacts.
191
196
# You can use "$ROOT" to indicate the root of the git repository.
192
197
#build-dir = "build"
193
198
194
199
# Instead of downloading the src/stage0.txt version of Cargo specified, use
195
200
# this Cargo binary instead to build all Rust code
196
- #cargo = "/path/to/bin/ cargo"
201
+ #cargo = "/path/to/cargo"
197
202
198
203
# Instead of downloading the src/stage0.txt version of the compiler
199
204
# specified, use this rustc binary instead as the stage0 snapshot compiler.
200
- #rustc = "/path/to/bin/ rustc"
205
+ #rustc = "/path/to/rustc"
201
206
202
207
# Instead of download the src/stage0.txt version of rustfmt specified,
203
208
# use this rustfmt binary instead as the stage0 snapshot rustfmt.
204
- #rustfmt = "/path/to/bin/ rustfmt"
209
+ #rustfmt = "/path/to/rustfmt"
205
210
206
211
# Flag to specify whether any documentation is built. If false, rustdoc and
207
212
# friends will still be compiled but they will not be used to generate any
@@ -326,16 +331,9 @@ changelog-seen = 2
326
331
# Where to install man pages in `prefix` above
327
332
#mandir = "share/man"
328
333
329
- # Where to install data in `prefix` above (currently unused)
334
+ # Where to install data in `prefix` above
330
335
#datadir = "share"
331
336
332
- # Where to install additional info in `prefix` above (currently unused)
333
- #infodir = "share/info"
334
-
335
- # Where to install local state (currently unused)
336
- # If this is a relative path, it will get installed in `prefix` above
337
- #localstatedir = "/var/lib"
338
-
339
337
# =============================================================================
340
338
# Options for compiling Rust code itself
341
339
# =============================================================================
@@ -387,7 +385,9 @@ changelog-seen = 2
387
385
388
386
# Sets the number of codegen units to build the standard library with,
389
387
# regardless of what the codegen-unit setting for the rest of the compiler is.
390
- #codegen-units-std = 1
388
+ # NOTE: building with anything other than 1 is known to occasionally have bugs.
389
+ # See https://github.com/rust-lang/rust/issues/83600.
390
+ #codegen-units-std = codegen-units
391
391
392
392
# Whether or not debug assertions are enabled for the compiler and standard
393
393
# library. Debug assertions control the maximum log level used by rustc. When
@@ -430,19 +430,13 @@ changelog-seen = 2
430
430
#debuginfo-level = 0
431
431
432
432
# Debuginfo level for the compiler.
433
- #
434
- # Defaults to rust.debuginfo-level value
435
- #debuginfo-level-rustc = 0
433
+ #debuginfo-level-rustc = debuginfo-level
436
434
437
435
# Debuginfo level for the standard library.
438
- #
439
- # Defaults to rust.debuginfo-level value
440
- #debuginfo-level-std = 0
436
+ #debuginfo-level-std = debuginfo-level
441
437
442
438
# Debuginfo level for the tools.
443
- #
444
- # Defaults to rust.debuginfo-level value
445
- #debuginfo-level-tools = 0
439
+ #debuginfo-level-tools = debuginfo-level
446
440
447
441
# Debuginfo level for the test suites run with compiletest.
448
442
# FIXME(#61117): Some tests fail when this option is enabled.
@@ -469,7 +463,9 @@ changelog-seen = 2
469
463
# The default linker that will be hard-coded into the generated compiler for
470
464
# targets that don't specify linker explicitly in their target specifications.
471
465
# Note that this is not the linker used to link said compiler.
472
- #default-linker = "cc"
466
+ #
467
+ # See https://doc.rust-lang.org/rustc/codegen-options/index.html#linker for more information.
468
+ #default-linker = <none> (path)
473
469
474
470
# The "channel" for the Rust build to produce. The stable/beta channels only
475
471
# allow using stable features, whereas the nightly and dev channels allow using
@@ -479,10 +475,15 @@ changelog-seen = 2
479
475
# A descriptive string to be appended to `rustc --version` output, which is
480
476
# also used in places like debuginfo `DW_AT_producer`. This may be useful for
481
477
# supplementary build information, like distro-specific package versions.
482
- #description = ""
478
+ #description = <none> (string)
483
479
484
- # The root location of the musl installation directory.
485
- #musl-root = "..."
480
+ # The root location of the musl installation directory. The library directory
481
+ # will also need to contain libunwind.a for an unwinding implementation. Note
482
+ # that this option only makes sense for musl targets that produce statically
483
+ # linked binaries.
484
+ #
485
+ # Defaults to /usr on musl hosts. Has no default otherwise.
486
+ #musl-root = <platform specific> (path)
486
487
487
488
# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
488
489
# platforms to ensure that the compiler is usable by default from the build
@@ -505,14 +506,14 @@ changelog-seen = 2
505
506
# Having the git information can cause a lot of rebuilds during development.
506
507
# Note: If this attribute is not explicitly set (e.g. if left commented out) it
507
508
# will default to true if channel = "dev", but will default to false otherwise.
508
- #ignore-git = true
509
+ #ignore-git = if channel == "dev" { true } else { false }
509
510
510
511
# When creating source tarballs whether or not to create a source tarball.
511
- #dist-src = false
512
+ #dist-src = true
512
513
513
514
# After building or testing extended tools (e.g. clippy and rustfmt), append the
514
515
# result (broken, compiling, testing) into this JSON file.
515
- #save-toolstates = "/ path/to/toolstates.json"
516
+ #save-toolstates = <none> ( path)
516
517
517
518
# This is an array of the codegen backends that will be compiled for the rustc
518
519
# that's being compiled. The default is to only build the LLVM codegen backend,
@@ -548,9 +549,7 @@ changelog-seen = 2
548
549
# Compile the compiler with a non-default ThinLTO import limit. This import
549
550
# limit controls the maximum size of functions imported by ThinLTO. Decreasing
550
551
# will make code compile faster at the expense of lower runtime performance.
551
- # If `incremental` is set to true above, the import limit will default to 10
552
- # instead of LLVM's default of 100.
553
- #thin-lto-import-instr-limit = 100
552
+ #thin-lto-import-instr-limit = if incremental { 10 } else { LLVM default (currently 100) }
554
553
555
554
# Map debuginfo paths to `/rust/$sha/...`, generally only set for releases
556
555
#remap-debuginfo = false
@@ -584,75 +583,78 @@ changelog-seen = 2
584
583
# =============================================================================
585
584
[target.x86_64-unknown-linux-gnu]
586
585
587
- # C compiler to be used to compiler C code. Note that the
586
+ # C compiler to be used to compile C code. Note that the
588
587
# default value is platform specific, and if not specified it may also depend on
589
588
# what platform is crossing to what platform.
590
- #cc = "cc"
589
+ # See `src/bootstrap/cc_detect.rs` for details.
590
+ #cc = "cc" (path)
591
591
592
- # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
592
+ # C++ compiler to be used to compile C++ code (e.g. LLVM and our LLVM shims).
593
593
# This is only used for host targets.
594
- #cxx = "c++"
594
+ # See `src/bootstrap/cc_detect.rs` for details.
595
+ #cxx = "c++" (path)
595
596
596
597
# Archiver to be used to assemble static libraries compiled from C/C++ code.
597
598
# Note: an absolute path should be used, otherwise LLVM build will break.
598
- #ar = "ar"
599
+ #ar = "ar" (path)
599
600
600
601
# Ranlib to be used to assemble static libraries compiled from C/C++ code.
601
602
# Note: an absolute path should be used, otherwise LLVM build will break.
602
- #ranlib = "ranlib"
603
+ #ranlib = "ranlib" (path)
603
604
604
- # Linker to be used to link Rust code. Note that the
605
+ # Linker to be used to bootstrap Rust code. Note that the
605
606
# default value is platform specific, and if not specified it may also depend on
606
607
# what platform is crossing to what platform.
607
608
# Setting this will override the `use-lld` option for Rust code when targeting MSVC.
608
- #linker = "cc"
609
+ #linker = "cc" (path)
609
610
610
611
# Path to the `llvm-config` binary of the installation of a custom LLVM to link
611
612
# against. Note that if this is specified we don't compile LLVM at all for this
612
613
# target.
613
- #llvm-config = "../ path/to/llvm/root/bin/llvm-config"
614
+ #llvm-config = <none> ( path)
614
615
615
616
# Normally the build system can find LLVM's FileCheck utility, but if
616
617
# not, you can specify an explicit file name for it.
617
- #llvm-filecheck = "/path/to/FileCheck"
618
+ #llvm-filecheck = "/path/to/llvm-version/bin/ FileCheck"
618
619
619
620
# If this target is for Android, this option will be required to specify where
620
621
# the NDK for the target lives. This is used to find the C compiler to link and
621
622
# build native code.
622
- #android-ndk = "/path/to/ndk"
623
+ # See `src/bootstrap/cc_detect.rs` for details.
624
+ #android-ndk = <none> (path)
623
625
624
626
# Build the sanitizer runtimes for this target.
625
627
# This option will override the same option under [build] section.
626
- #sanitizers = false
628
+ #sanitizers = build.sanitizers (bool)
627
629
628
630
# Build the profiler runtime for this target(required when compiling with options that depend
629
631
# on this runtime, such as `-C profile-generate` or `-Z instrument-coverage`).
630
632
# This option will override the same option under [build] section.
631
- #profiler = false
633
+ #profiler = build.profiler (bool)
632
634
633
635
# Force static or dynamic linkage of the standard library for this target. If
634
636
# this target is a host for rustc, this will also affect the linkage of the
635
637
# compiler itself. This is useful for building rustc on targets that normally
636
638
# only use static libraries. If unset, the target's default linkage is used.
637
- #crt-static = false
639
+ #crt-static = <platform-specific> (bool)
638
640
639
641
# The root location of the musl installation directory. The library directory
640
642
# will also need to contain libunwind.a for an unwinding implementation. Note
641
643
# that this option only makes sense for musl targets that produce statically
642
- # linked binaries
643
- #musl-root = "..."
644
+ # linked binaries.
645
+ #musl-root = build.musl-root (path)
644
646
645
647
# The full path to the musl libdir.
646
648
#musl-libdir = musl-root/lib
647
649
648
650
# The root location of the `wasm32-wasi` sysroot. Only used for the
649
651
# `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
650
652
# create a `[target.wasm32-wasi]` section and move this field there.
651
- #wasi-root = "..."
653
+ #wasi-root = <none> (path)
652
654
653
655
# Used in testing for configuring where the QEMU images are located, you
654
656
# probably don't want to use this.
655
- #qemu-rootfs = "..."
657
+ #qemu-rootfs = <none> (path)
656
658
657
659
# =============================================================================
658
660
# Distribution options
@@ -669,31 +671,27 @@ changelog-seen = 2
669
671
#
670
672
# This folder should be populated ahead of time before the build system is
671
673
# invoked.
672
- #sign-folder = "path/to/folder/to/sign"
673
-
674
- # This is a file which contains the password of the default gpg key. This will
675
- # be passed to `gpg` down the road when signing all files in `sign-folder`
676
- # above. This should be stored in plaintext.
677
- #gpg-password-file = "path/to/gpg/password"
674
+ #sign-folder = <none> (path)
678
675
679
676
# The remote address that all artifacts will eventually be uploaded to. The
680
677
# build system generates manifests which will point to these urls, and for the
681
678
# manifests to be correct they'll have to have the right URLs encoded.
682
679
#
683
680
# Note that this address should not contain a trailing slash as file names will
684
681
# be appended to it.
685
- #upload-addr = "https://example.com/folder"
682
+ #upload-addr = <none> (URL)
686
683
687
684
# Whether to build a plain source tarball to upload
688
685
# We disable that on Windows not to override the one already uploaded on S3
689
686
# as the one built on Windows will contain backslashes in paths causing problems
690
687
# on linux
691
688
#src-tarball = true
692
- #
693
689
694
690
# Whether to allow failures when building tools
695
691
#missing-tools = false
696
692
697
693
# List of compression formats to use when generating dist tarballs. The list of
698
694
# formats is provided to rust-installer, which must support all of them.
695
+ #
696
+ # This list must be non-empty.
699
697
#compression-formats = ["gz", "xz"]
0 commit comments