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