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