]> git.proxmox.com Git - rustc.git/blob - config.toml.example
Merge branch 'debian/experimental' into debian/sid
[rustc.git] / config.toml.example
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
12 # =============================================================================
13 # Tweaking how LLVM is compiled
14 # =============================================================================
15 [llvm]
16
17 # Indicates whether LLVM rebuild should be skipped when running bootstrap. If
18 # this is `false` then the compiler's LLVM will be rebuilt whenever the built
19 # version doesn't have the correct hash. If it is `true` then LLVM will never
20 # be rebuilt. The default value is `false`.
21 #skip-rebuild = false
22
23 # Indicates whether the LLVM build is a Release or Debug build
24 #optimize = true
25
26 # Indicates whether LLVM should be built with ThinLTO. Note that this will
27 # only succeed if you use clang, lld, llvm-ar, and llvm-ranlib in your C/C++
28 # toolchain (see the `cc`, `cxx`, `linker`, `ar`, and `ranlib` options below).
29 # More info at: https://clang.llvm.org/docs/ThinLTO.html#clang-bootstrap
30 #thin-lto = false
31
32 # Indicates whether an LLVM Release build should include debug info
33 #release-debuginfo = false
34
35 # Indicates whether the LLVM assertions are enabled or not
36 #assertions = false
37
38 # Indicates whether ccache is used when building LLVM
39 #ccache = false
40 # or alternatively ...
41 #ccache = "/path/to/ccache"
42
43 # If an external LLVM root is specified, we automatically check the version by
44 # default to make sure it's within the range that we're expecting, but setting
45 # this flag will indicate that this version check should not be done.
46 #version-check = true
47
48 # Link libstdc++ statically into the librustc_llvm instead of relying on a
49 # dynamic version to be available.
50 #static-libstdcpp = false
51
52 # Tell the LLVM build system to use Ninja instead of the platform default for
53 # the generated build system. This can sometimes be faster than make, for
54 # example.
55 #ninja = false
56
57 # LLVM targets to build support for.
58 # Note: this is NOT related to Rust compilation targets. However, as Rust is
59 # dependent on LLVM for code generation, turning targets off here WILL lead to
60 # the resulting rustc being unable to compile for the disabled architectures.
61 # Also worth pointing out is that, in case support for new targets are added to
62 # LLVM, enabling them here doesn't mean Rust is automatically gaining said
63 # support. You'll need to write a target specification at least, and most
64 # likely, teach rustc about the C ABI of the target. Get in touch with the
65 # Rust team and file an issue if you need assistance in porting!
66 #targets = "AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86"
67
68 # LLVM experimental targets to build support for. These targets are specified in
69 # the same format as above, but since these targets are experimental, they are
70 # not built by default and the experimental Rust compilation targets that depend
71 # on them will not work unless the user opts in to building them.
72 #experimental-targets = ""
73
74 # Cap the number of parallel linker invocations when compiling LLVM.
75 # This can be useful when building LLVM with debug info, which significantly
76 # increases the size of binaries and consequently the memory required by
77 # each linker process.
78 # If absent or 0, linker invocations are treated like any other job and
79 # controlled by rustbuild's -j parameter.
80 #link-jobs = 0
81
82 # When invoking `llvm-config` this configures whether the `--shared` argument is
83 # passed to prefer linking to shared libraries.
84 #link-shared = false
85
86 # When building llvm, this configures what is being appended to the version.
87 # The default is "-rust-$version-$channel", except for dev channel where rustc
88 # version number is omitted. To use LLVM version as is, provide an empty string.
89 #version-suffix = "-rust-dev"
90
91 # On MSVC you can compile LLVM with clang-cl, but the test suite doesn't pass
92 # with clang-cl, so this is special in that it only compiles LLVM with clang-cl
93 #clang-cl = '/path/to/clang-cl.exe'
94
95 # Pass extra compiler and linker flags to the LLVM CMake build.
96 #cflags = "-fextra-flag"
97 #cxxflags = "-fextra-flag"
98 #ldflags = "-Wl,extra-flag"
99
100 # Use libc++ when building LLVM instead of libstdc++. This is the default on
101 # platforms already use libc++ as the default C++ library, but this option
102 # allows you to use libc++ even on platforms when it's not. You need to ensure
103 # that your host compiler ships with libc++.
104 #use-libcxx = true
105
106 # The value specified here will be passed as `-DLLVM_USE_LINKER` to CMake.
107 #use-linker = "lld"
108
109 # Whether or not to specify `-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=YES`
110 #allow-old-toolchain = false
111
112 # =============================================================================
113 # General build configuration options
114 # =============================================================================
115 [build]
116
117 # Build triple for the original snapshot compiler. This must be a compiler that
118 # nightlies are already produced for. The current platform must be able to run
119 # binaries of this build triple and the nightly will be used to bootstrap the
120 # first compiler.
121 #build = "x86_64-unknown-linux-gnu" # defaults to your host platform
122
123 # In addition to the build triple, other triples to produce full compiler
124 # toolchains for. Each of these triples will be bootstrapped from the build
125 # triple and then will continue to bootstrap themselves. This platform must
126 # currently be able to run all of the triples provided here.
127 #host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
128
129 # In addition to all host triples, other triples to produce the standard library
130 # for. Each host triple will be used to produce a copy of the standard library
131 # for each target triple.
132 #target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
133
134 # Use this directory to store build artifacts.
135 # You can use "$ROOT" to indicate the root of the git repository.
136 #build-dir = "build"
137
138 # Instead of downloading the src/stage0.txt version of Cargo specified, use
139 # this Cargo binary instead to build all Rust code
140 #cargo = "/path/to/bin/cargo"
141
142 # Instead of downloading the src/stage0.txt version of the compiler
143 # specified, use this rustc binary instead as the stage0 snapshot compiler.
144 #rustc = "/path/to/bin/rustc"
145
146 # Instead of download the src/stage0.txt version of rustfmt specified,
147 # use this rustfmt binary instead as the stage0 snapshot rustfmt.
148 #rustfmt = "/path/to/bin/rustfmt"
149
150 # Flag to specify whether any documentation is built. If false, rustdoc and
151 # friends will still be compiled but they will not be used to generate any
152 # documentation.
153 #docs = true
154
155 # Indicate whether the compiler should be documented in addition to the standard
156 # library and facade crates.
157 #compiler-docs = false
158
159 # Indicate whether git submodules are managed and updated automatically.
160 #submodules = true
161
162 # Update git submodules only when the checked out commit in the submodules differs
163 # from what is committed in the main rustc repo.
164 #fast-submodules = true
165
166 # The path to (or name of) the GDB executable to use. This is only used for
167 # executing the debuginfo test suite.
168 #gdb = "gdb"
169
170 # The node.js executable to use. Note that this is only used for the emscripten
171 # target when running tests, otherwise this can be omitted.
172 #nodejs = "node"
173
174 # Python interpreter to use for various tasks throughout the build, notably
175 # rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
176 #
177 # Defaults to the Python interpreter used to execute x.py.
178 #python = "python"
179
180 # Force Cargo to check that Cargo.lock describes the precise dependency
181 # set that all the Cargo.toml files create, instead of updating it.
182 #locked-deps = false
183
184 # Indicate whether the vendored sources are used for Rust dependencies or not
185 #vendor = false
186
187 # Typically the build system will build the Rust compiler twice. The second
188 # compiler, however, will simply use its own libraries to link against. If you
189 # would rather to perform a full bootstrap, compiling the compiler three times,
190 # then you can set this option to true. You shouldn't ever need to set this
191 # option to true.
192 #full-bootstrap = false
193
194 # Enable a build of the extended Rust tool set which is not only the compiler
195 # but also tools such as Cargo. This will also produce "combined installers"
196 # which are used to install Rust and Cargo together. This is disabled by
197 # default. The `tools` option (immediately below) specifies which tools should
198 # be built if `extended = true`.
199 #extended = false
200
201 # Installs chosen set of extended tools if `extended = true`. By default builds all.
202 # If chosen tool failed to build the installation fails. If `extended = false`, this
203 # option is ignored.
204 #tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src"]
205
206 # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
207 #verbose = 0
208
209 # Build the sanitizer runtimes
210 #sanitizers = false
211
212 # Build the profiler runtime
213 #profiler = false
214
215 # Indicates whether the native libraries linked into Cargo will be statically
216 # linked or not.
217 #cargo-native-static = false
218
219 # Run the build with low priority, by setting the process group's "nice" value
220 # to +10 on Unix platforms, and by using a "low priority" job object on Windows.
221 #low-priority = false
222
223 # Arguments passed to the `./configure` script, used during distcheck. You
224 # probably won't fill this in but rather it's filled in by the `./configure`
225 # script.
226 #configure-args = []
227
228 # Indicates that a local rebuild is occurring instead of a full bootstrap,
229 # essentially skipping stage0 as the local compiler is recompiling itself again.
230 #local-rebuild = false
231
232 # Print out how long each rustbuild step took (mostly intended for CI and
233 # tracking over time)
234 #print-step-timings = false
235
236 # =============================================================================
237 # General install configuration options
238 # =============================================================================
239 [install]
240
241 # Instead of installing to /usr/local, install to this path instead.
242 #prefix = "/usr/local"
243
244 # Where to install system configuration files
245 # If this is a relative path, it will get installed in `prefix` above
246 #sysconfdir = "/etc"
247
248 # Where to install documentation in `prefix` above
249 #docdir = "share/doc/rust"
250
251 # Where to install binaries in `prefix` above
252 #bindir = "bin"
253
254 # Where to install libraries in `prefix` above
255 #libdir = "lib"
256
257 # Where to install man pages in `prefix` above
258 #mandir = "share/man"
259
260 # Where to install data in `prefix` above (currently unused)
261 #datadir = "share"
262
263 # Where to install additional info in `prefix` above (currently unused)
264 #infodir = "share/info"
265
266 # Where to install local state (currently unused)
267 # If this is a relative path, it will get installed in `prefix` above
268 #localstatedir = "/var/lib"
269
270 # =============================================================================
271 # Options for compiling Rust code itself
272 # =============================================================================
273 [rust]
274
275 # Whether or not to optimize the compiler and standard library.
276 # WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping,
277 # building without optimizations takes much longer than optimizing. Further, some platforms
278 # fail to build without this optimization (c.f. #65352).
279 #optimize = true
280
281 # Indicates that the build should be configured for debugging Rust. A
282 # `debug`-enabled compiler and standard library will be somewhat
283 # slower (due to e.g. checking of debug assertions) but should remain
284 # usable.
285 #
286 # Note: If this value is set to `true`, it will affect a number of
287 # configuration options below as well, if they have been left
288 # unconfigured in this file.
289 #
290 # Note: changes to the `debug` setting do *not* affect `optimize`
291 # above. In theory, a "maximally debuggable" environment would
292 # set `optimize` to `false` above to assist the introspection
293 # facilities of debuggers like lldb and gdb. To recreate such an
294 # environment, explicitly set `optimize` to `false` and `debug`
295 # to `true`. In practice, everyone leaves `optimize` set to
296 # `true`, because an unoptimized rustc with debugging
297 # enabled becomes *unusably slow* (e.g. rust-lang/rust#24840
298 # reported a 25x slowdown) and bootstrapping the supposed
299 # "maximally debuggable" environment (notably libstd) takes
300 # hours to build.
301 #
302 #debug = false
303
304 # Number of codegen units to use for each compiler invocation. A value of 0
305 # means "the number of cores on this machine", and 1+ is passed through to the
306 # compiler.
307 #codegen-units = 1
308
309 # Sets the number of codegen units to build the standard library with,
310 # regardless of what the codegen-unit setting for the rest of the compiler is.
311 #codegen-units-std = 1
312
313 # Whether or not debug assertions are enabled for the compiler and standard
314 # library.
315 #debug-assertions = debug
316
317 # Whether or not debug assertions are enabled for the standard library.
318 # Overrides the `debug-assertions` option, if defined.
319 #debug-assertions-std = debug-assertions
320
321 # Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
322 # `0` - no debug info
323 # `1` - line tables only
324 # `2` - full debug info with variable and type information
325 # Can be overridden for specific subsets of Rust code (rustc, std or tools).
326 # Debuginfo for tests run with compiletest is not controlled by this option
327 # and needs to be enabled separately with `debuginfo-level-tests`.
328 #debuginfo-level = if debug { 2 } else { 0 }
329
330 # Debuginfo level for the compiler.
331 #debuginfo-level-rustc = debuginfo-level
332
333 # Debuginfo level for the standard library.
334 #debuginfo-level-std = debuginfo-level
335
336 # Debuginfo level for the tools.
337 #debuginfo-level-tools = debuginfo-level
338
339 # Debuginfo level for the test suites run with compiletest.
340 # FIXME(#61117): Some tests fail when this option is enabled.
341 #debuginfo-level-tests = 0
342
343 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
344 #backtrace = true
345
346 # Whether to always use incremental compilation when building rustc
347 #incremental = false
348
349 # Build a multi-threaded rustc
350 #parallel-compiler = false
351
352 # The default linker that will be hard-coded into the generated compiler for
353 # targets that don't specify linker explicitly in their target specifications.
354 # Note that this is not the linker used to link said compiler.
355 #default-linker = "cc"
356
357 # The "channel" for the Rust build to produce. The stable/beta channels only
358 # allow using stable features, whereas the nightly and dev channels allow using
359 # nightly features
360 #channel = "dev"
361
362 # The root location of the MUSL installation directory.
363 #musl-root = "..."
364
365 # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
366 # platforms to ensure that the compiler is usable by default from the build
367 # directory (as it links to a number of dynamic libraries). This may not be
368 # desired in distributions, for example.
369 #rpath = true
370
371 # Emits extraneous output from tests to ensure that failures of the test
372 # harness are debuggable just from logfiles.
373 #verbose-tests = false
374
375 # Flag indicating whether tests are compiled with optimizations (the -O flag).
376 #optimize-tests = true
377
378 # Flag indicating whether codegen tests will be run or not. If you get an error
379 # saying that the FileCheck executable is missing, you may want to disable this.
380 # Also see the target's llvm-filecheck option.
381 #codegen-tests = true
382
383 # Flag indicating whether git info will be retrieved from .git automatically.
384 # Having the git information can cause a lot of rebuilds during development.
385 # Note: If this attribute is not explicitly set (e.g. if left commented out) it
386 # will default to true if channel = "dev", but will default to false otherwise.
387 #ignore-git = true
388
389 # When creating source tarballs whether or not to create a source tarball.
390 #dist-src = false
391
392 # After building or testing extended tools (e.g. clippy and rustfmt), append the
393 # result (broken, compiling, testing) into this JSON file.
394 #save-toolstates = "/path/to/toolstates.json"
395
396 # This is an array of the codegen backends that will be compiled for the rustc
397 # that's being compiled. The default is to only build the LLVM codegen backend,
398 # and currently the only standard option supported is `"llvm"`
399 #codegen-backends = ["llvm"]
400
401 # Indicates whether LLD will be compiled and made available in the sysroot for
402 # rustc to execute.
403 #lld = false
404
405 # Indicates whether LLD will be used to link Rust crates during bootstrap on
406 # supported platforms. The LLD from the bootstrap distribution will be used
407 # and not the LLD compiled during the bootstrap.
408 #
409 # LLD will not be used if we're cross linking or running tests.
410 #
411 # Explicitly setting the linker for a target will override this option.
412 #use-lld = false
413
414 # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
415 # sysroot.
416 #llvm-tools = false
417
418 # Whether to deny warnings in crates
419 #deny-warnings = true
420
421 # Print backtrace on internal compiler errors during bootstrap
422 #backtrace-on-ice = false
423
424 # Whether to verify generated LLVM IR
425 #verify-llvm-ir = false
426
427 # Compile the compiler with a non-default ThinLTO import limit. This import
428 # limit controls the maximum size of functions imported by ThinLTO. Decreasing
429 # will make code compile faster at the expense of lower runtime performance.
430 # If `incremental` is set to true above, the import limit will default to 10
431 # instead of LLVM's default of 100.
432 #thin-lto-import-instr-limit = 100
433
434 # Map all debuginfo paths for libstd and crates to `/rust/$sha/$crate/...`,
435 # generally only set for releases
436 #remap-debuginfo = false
437
438 # Link the compiler against `jemalloc`, where on Linux and OSX it should
439 # override the default allocator for rustc and LLVM.
440 #jemalloc = false
441
442 # Run tests in various test suites with the "nll compare mode" in addition to
443 # running the tests in normal mode. Largely only used on CI and during local
444 # development of NLL
445 #test-compare-mode = false
446
447 # Use LLVM libunwind as the implementation for Rust's unwinder.
448 #llvm-libunwind = false
449
450 # Enable Windows Control Flow Guard checks in the standard library.
451 # This only applies from stage 1 onwards, and only for Windows targets.
452 #control-flow-guard = false
453
454 # =============================================================================
455 # Options for specific targets
456 #
457 # Each of the following options is scoped to the specific target triple in
458 # question and is used for determining how to compile each target.
459 # =============================================================================
460 [target.x86_64-unknown-linux-gnu]
461
462 # C compiler to be used to compiler C code. Note that the
463 # default value is platform specific, and if not specified it may also depend on
464 # what platform is crossing to what platform.
465 #cc = "cc"
466
467 # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
468 # This is only used for host targets.
469 #cxx = "c++"
470
471 # Archiver to be used to assemble static libraries compiled from C/C++ code.
472 # Note: an absolute path should be used, otherwise LLVM build will break.
473 #ar = "ar"
474
475 # Ranlib to be used to assemble static libraries compiled from C/C++ code.
476 # Note: an absolute path should be used, otherwise LLVM build will break.
477 #ranlib = "ranlib"
478
479 # Linker to be used to link Rust code. Note that the
480 # default value is platform specific, and if not specified it may also depend on
481 # what platform is crossing to what platform.
482 # Setting this will override the `use-lld` option for Rust code.
483 #linker = "cc"
484
485 # Path to the `llvm-config` binary of the installation of a custom LLVM to link
486 # against. Note that if this is specified we don't compile LLVM at all for this
487 # target.
488 #llvm-config = "../path/to/llvm/root/bin/llvm-config"
489
490 # Normally the build system can find LLVM's FileCheck utility, but if
491 # not, you can specify an explicit file name for it.
492 #llvm-filecheck = "/path/to/FileCheck"
493
494 # If this target is for Android, this option will be required to specify where
495 # the NDK for the target lives. This is used to find the C compiler to link and
496 # build native code.
497 #android-ndk = "/path/to/ndk"
498
499 # Force static or dynamic linkage of the standard library for this target. If
500 # this target is a host for rustc, this will also affect the linkage of the
501 # compiler itself. This is useful for building rustc on targets that normally
502 # only use static libraries. If unset, the target's default linkage is used.
503 #crt-static = false
504
505 # The root location of the MUSL installation directory. The library directory
506 # will also need to contain libunwind.a for an unwinding implementation. Note
507 # that this option only makes sense for MUSL targets that produce statically
508 # linked binaries
509 #musl-root = "..."
510
511 # The root location of the `wasm32-wasi` sysroot.
512 #wasi-root = "..."
513
514 # Used in testing for configuring where the QEMU images are located, you
515 # probably don't want to use this.
516 #qemu-rootfs = "..."
517
518 # =============================================================================
519 # Distribution options
520 #
521 # These options are related to distribution, mostly for the Rust project itself.
522 # You probably won't need to concern yourself with any of these options
523 # =============================================================================
524 [dist]
525
526 # This is the folder of artifacts that the build system will sign. All files in
527 # this directory will be signed with the default gpg key using the system `gpg`
528 # binary. The `asc` and `sha256` files will all be output into the standard dist
529 # output folder (currently `build/dist`)
530 #
531 # This folder should be populated ahead of time before the build system is
532 # invoked.
533 #sign-folder = "path/to/folder/to/sign"
534
535 # This is a file which contains the password of the default gpg key. This will
536 # be passed to `gpg` down the road when signing all files in `sign-folder`
537 # above. This should be stored in plaintext.
538 #gpg-password-file = "path/to/gpg/password"
539
540 # The remote address that all artifacts will eventually be uploaded to. The
541 # build system generates manifests which will point to these urls, and for the
542 # manifests to be correct they'll have to have the right URLs encoded.
543 #
544 # Note that this address should not contain a trailing slash as file names will
545 # be appended to it.
546 #upload-addr = "https://example.com/folder"
547
548 # Whether to build a plain source tarball to upload
549 # We disable that on Windows not to override the one already uploaded on S3
550 # as the one built on Windows will contain backslashes in paths causing problems
551 # on linux
552 #src-tarball = true
553 #
554
555 # Whether to allow failures when building tools
556 #missing-tools = false