@@ -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
@@ -325,16 +330,9 @@ changelog-seen = 2
325
330
# Where to install man pages in `prefix` above
326
331
#mandir = "share/man"
327
332
328
- # Where to install data in `prefix` above (currently unused)
333
+ # Where to install data in `prefix` above
329
334
#datadir = "share"
330
335
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
-
338
336
# =============================================================================
339
337
# Options for compiling Rust code itself
340
338
# =============================================================================
@@ -384,7 +382,9 @@ changelog-seen = 2
384
382
385
383
# Sets the number of codegen units to build the standard library with,
386
384
# 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
388
388
389
389
# Whether or not debug assertions are enabled for the compiler and standard
390
390
# library. Debug assertions control the maximum log level used by rustc. When
@@ -427,19 +427,13 @@ changelog-seen = 2
427
427
#debuginfo-level = 0
428
428
429
429
# Debuginfo level for the compiler.
430
- #
431
- # Defaults to rust.debuginfo-level value
432
- #debuginfo-level-rustc = 0
430
+ #debuginfo-level-rustc = debuginfo-level
433
431
434
432
# 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
438
434
439
435
# Debuginfo level for the tools.
440
- #
441
- # Defaults to rust.debuginfo-level value
442
- #debuginfo-level-tools = 0
436
+ #debuginfo-level-tools = debuginfo-level
443
437
444
438
# Debuginfo level for the test suites run with compiletest.
445
439
# FIXME(#61117): Some tests fail when this option is enabled.
@@ -466,7 +460,9 @@ changelog-seen = 2
466
460
# The default linker that will be hard-coded into the generated compiler for
467
461
# targets that don't specify linker explicitly in their target specifications.
468
462
# 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)
470
466
471
467
# The "channel" for the Rust build to produce. The stable/beta channels only
472
468
# allow using stable features, whereas the nightly and dev channels allow using
@@ -476,10 +472,15 @@ changelog-seen = 2
476
472
# A descriptive string to be appended to `rustc --version` output, which is
477
473
# also used in places like debuginfo `DW_AT_producer`. This may be useful for
478
474
# supplementary build information, like distro-specific package versions.
479
- #description = ""
475
+ #description = <none> (string)
480
476
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)
483
484
484
485
# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
485
486
# platforms to ensure that the compiler is usable by default from the build
@@ -502,14 +503,14 @@ changelog-seen = 2
502
503
# Having the git information can cause a lot of rebuilds during development.
503
504
# Note: If this attribute is not explicitly set (e.g. if left commented out) it
504
505
# 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 }
506
507
507
508
# When creating source tarballs whether or not to create a source tarball.
508
- #dist-src = false
509
+ #dist-src = true
509
510
510
511
# After building or testing extended tools (e.g. clippy and rustfmt), append the
511
512
# result (broken, compiling, testing) into this JSON file.
512
- #save-toolstates = "/ path/to/toolstates.json"
513
+ #save-toolstates = <none> ( path)
513
514
514
515
# This is an array of the codegen backends that will be compiled for the rustc
515
516
# that's being compiled. The default is to only build the LLVM codegen backend,
@@ -545,9 +546,7 @@ changelog-seen = 2
545
546
# Compile the compiler with a non-default ThinLTO import limit. This import
546
547
# limit controls the maximum size of functions imported by ThinLTO. Decreasing
547
548
# 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) }
551
550
552
551
# Map debuginfo paths to `/rust/$sha/...`, generally only set for releases
553
552
#remap-debuginfo = false
@@ -581,75 +580,78 @@ changelog-seen = 2
581
580
# =============================================================================
582
581
[target.x86_64-unknown-linux-gnu]
583
582
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
585
584
# default value is platform specific, and if not specified it may also depend on
586
585
# what platform is crossing to what platform.
587
- #cc = "cc"
586
+ # See `src/bootstrap/cc_detect.rs` for details.
587
+ #cc = "cc" (path)
588
588
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).
590
590
# This is only used for host targets.
591
- #cxx = "c++"
591
+ # See `src/bootstrap/cc_detect.rs` for details.
592
+ #cxx = "c++" (path)
592
593
593
594
# Archiver to be used to assemble static libraries compiled from C/C++ code.
594
595
# Note: an absolute path should be used, otherwise LLVM build will break.
595
- #ar = "ar"
596
+ #ar = "ar" (path)
596
597
597
598
# Ranlib to be used to assemble static libraries compiled from C/C++ code.
598
599
# Note: an absolute path should be used, otherwise LLVM build will break.
599
- #ranlib = "ranlib"
600
+ #ranlib = "ranlib" (path)
600
601
601
- # Linker to be used to link Rust code. Note that the
602
+ # Linker to be used to bootstrap Rust code. Note that the
602
603
# default value is platform specific, and if not specified it may also depend on
603
604
# what platform is crossing to what platform.
604
605
# Setting this will override the `use-lld` option for Rust code when targeting MSVC.
605
- #linker = "cc"
606
+ #linker = "cc" (path)
606
607
607
608
# Path to the `llvm-config` binary of the installation of a custom LLVM to link
608
609
# against. Note that if this is specified we don't compile LLVM at all for this
609
610
# target.
610
- #llvm-config = "../ path/to/llvm/root/bin/llvm-config"
611
+ #llvm-config = <none> ( path)
611
612
612
613
# Normally the build system can find LLVM's FileCheck utility, but if
613
614
# 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"
615
616
616
617
# If this target is for Android, this option will be required to specify where
617
618
# the NDK for the target lives. This is used to find the C compiler to link and
618
619
# build native code.
619
- #android-ndk = "/path/to/ndk"
620
+ # See `src/bootstrap/cc_detect.rs` for details.
621
+ #android-ndk = <none> (path)
620
622
621
623
# Build the sanitizer runtimes for this target.
622
624
# This option will override the same option under [build] section.
623
- #sanitizers = false
625
+ #sanitizers = build.sanitizers (bool)
624
626
625
627
# Build the profiler runtime for this target(required when compiling with options that depend
626
628
# on this runtime, such as `-C profile-generate` or `-Z instrument-coverage`).
627
629
# This option will override the same option under [build] section.
628
- #profiler = false
630
+ #profiler = build.profiler (bool)
629
631
630
632
# Force static or dynamic linkage of the standard library for this target. If
631
633
# this target is a host for rustc, this will also affect the linkage of the
632
634
# compiler itself. This is useful for building rustc on targets that normally
633
635
# only use static libraries. If unset, the target's default linkage is used.
634
- #crt-static = false
636
+ #crt-static = <platform-specific> (bool)
635
637
636
638
# The root location of the musl installation directory. The library directory
637
639
# will also need to contain libunwind.a for an unwinding implementation. Note
638
640
# 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)
641
643
642
644
# The full path to the musl libdir.
643
645
#musl-libdir = musl-root/lib
644
646
645
647
# The root location of the `wasm32-wasi` sysroot. Only used for the
646
648
# `wasm32-wasi` target. If you are building wasm32-wasi target, make sure to
647
649
# create a `[target.wasm32-wasi]` section and move this field there.
648
- #wasi-root = "..."
650
+ #wasi-root = <none> (path)
649
651
650
652
# Used in testing for configuring where the QEMU images are located, you
651
653
# probably don't want to use this.
652
- #qemu-rootfs = "..."
654
+ #qemu-rootfs = <none> (path)
653
655
654
656
# =============================================================================
655
657
# Distribution options
@@ -666,31 +668,27 @@ changelog-seen = 2
666
668
#
667
669
# This folder should be populated ahead of time before the build system is
668
670
# 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)
675
672
676
673
# The remote address that all artifacts will eventually be uploaded to. The
677
674
# build system generates manifests which will point to these urls, and for the
678
675
# manifests to be correct they'll have to have the right URLs encoded.
679
676
#
680
677
# Note that this address should not contain a trailing slash as file names will
681
678
# be appended to it.
682
- #upload-addr = "https://example.com/folder"
679
+ #upload-addr = <none> (URL)
683
680
684
681
# Whether to build a plain source tarball to upload
685
682
# We disable that on Windows not to override the one already uploaded on S3
686
683
# as the one built on Windows will contain backslashes in paths causing problems
687
684
# on linux
688
685
#src-tarball = true
689
- #
690
686
691
687
# Whether to allow failures when building tools
692
688
#missing-tools = false
693
689
694
690
# List of compression formats to use when generating dist tarballs. The list of
695
691
# formats is provided to rust-installer, which must support all of them.
692
+ #
693
+ # This list must be non-empty.
696
694
#compression-formats = ["gz", "xz"]
0 commit comments