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