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