]> git.lizzy.rs Git - rust.git/blob - config.toml.example
trip const_to_alloc query
[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 # 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 # =============================================================================
90 # General build configuration options
91 # =============================================================================
92 [build]
93
94 # Build triple for the original snapshot compiler. This must be a compiler that
95 # nightlies are already produced for. The current platform must be able to run
96 # binaries of this build triple and the nightly will be used to bootstrap the
97 # first compiler.
98 #build = "x86_64-unknown-linux-gnu"    # defaults to your host platform
99
100 # In addition to the build triple, other triples to produce full compiler
101 # toolchains for. Each of these triples will be bootstrapped from the build
102 # triple and then will continue to bootstrap themselves. This platform must
103 # currently be able to run all of the triples provided here.
104 #host = ["x86_64-unknown-linux-gnu"]   # defaults to just the build triple
105
106 # In addition to all host triples, other triples to produce the standard library
107 # for. Each host triple will be used to produce a copy of the standard library
108 # for each target triple.
109 #target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
110
111 # Instead of downloading the src/stage0.txt version of Cargo specified, use
112 # this Cargo binary instead to build all Rust code
113 #cargo = "/path/to/bin/cargo"
114
115 # Instead of downloading the src/stage0.txt version of the compiler
116 # specified, use this rustc binary instead as the stage0 snapshot compiler.
117 #rustc = "/path/to/bin/rustc"
118
119 # Flag to specify whether any documentation is built. If false, rustdoc and
120 # friends will still be compiled but they will not be used to generate any
121 # documentation.
122 #docs = true
123
124 # Indicate whether the compiler should be documented in addition to the standard
125 # library and facade crates.
126 #compiler-docs = false
127
128 # Indicate whether submodules are managed and updated automatically.
129 #submodules = true
130
131 # Update submodules only when the checked out commit in the submodules differs
132 # from what is committed in the main rustc repo.
133 #fast-submodules = true
134
135 # The path to (or name of) the GDB executable to use. This is only used for
136 # executing the debuginfo test suite.
137 #gdb = "gdb"
138
139 # The node.js executable to use. Note that this is only used for the emscripten
140 # target when running tests, otherwise this can be omitted.
141 #nodejs = "node"
142
143 # Python interpreter to use for various tasks throughout the build, notably
144 # rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
145 # Note that Python 2 is currently required.
146 #python = "python2.7"
147
148 # Force Cargo to check that Cargo.lock describes the precise dependency
149 # set that all the Cargo.toml files create, instead of updating it.
150 #locked-deps = false
151
152 # Indicate whether the vendored sources are used for Rust dependencies or not
153 #vendor = false
154
155 # Typically the build system will build the rust compiler twice. The second
156 # compiler, however, will simply use its own libraries to link against. If you
157 # would rather to perform a full bootstrap, compiling the compiler three times,
158 # then you can set this option to true. You shouldn't ever need to set this
159 # option to true.
160 #full-bootstrap = false
161
162 # Enable a build of the extended rust tool set which is not only the compiler
163 # but also tools such as Cargo. This will also produce "combined installers"
164 # which are used to install Rust and Cargo together. This is disabled by
165 # default.
166 #extended = false
167
168 # Installs chosen set of extended tools if enables. By default builds all.
169 # If chosen tool failed to build the installation fails.
170 #tools = ["cargo", "rls", "rustfmt", "analysis", "src"]
171
172 # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
173 #verbose = 0
174
175 # Build the sanitizer runtimes
176 #sanitizers = false
177
178 # Build the profiler runtime
179 #profiler = false
180
181 # Indicates whether the OpenSSL linked into Cargo will be statically linked or
182 # not. If static linkage is specified then the build system will download a
183 # known-good version of OpenSSL, compile it, and link it to Cargo.
184 #openssl-static = false
185
186 # Run the build with low priority, by setting the process group's "nice" value
187 # to +10 on Unix platforms, and by using a "low priority" job object on Windows.
188 #low-priority = false
189
190 # Arguments passed to the `./configure` script, used during distcheck. You
191 # probably won't fill this in but rather it's filled in by the `./configure`
192 # script.
193 #configure-args = []
194
195 # Indicates that a local rebuild is occurring instead of a full bootstrap,
196 # essentially skipping stage0 as the local compiler is recompiling itself again.
197 #local-rebuild = false
198
199 # Print out how long each rustbuild step took (mostly intended for CI and
200 # tracking over time)
201 #print-step-timings = false
202
203 # =============================================================================
204 # General install configuration options
205 # =============================================================================
206 [install]
207
208 # Instead of installing to /usr/local, install to this path instead.
209 #prefix = "/usr/local"
210
211 # Where to install system configuration files
212 # If this is a relative path, it will get installed in `prefix` above
213 #sysconfdir = "/etc"
214
215 # Where to install documentation in `prefix` above
216 #docdir = "share/doc/rust"
217
218 # Where to install binaries in `prefix` above
219 #bindir = "bin"
220
221 # Where to install libraries in `prefix` above
222 #libdir = "lib"
223
224 # Where to install man pages in `prefix` above
225 #mandir = "share/man"
226
227 # Where to install data in `prefix` above (currently unused)
228 #datadir = "share"
229
230 # Where to install additional info in `prefix` above (currently unused)
231 #infodir = "share/info"
232
233 # Where to install local state (currently unused)
234 # If this is a relative path, it will get installed in `prefix` above
235 #localstatedir = "/var/lib"
236
237 # =============================================================================
238 # Options for compiling Rust code itself
239 # =============================================================================
240 [rust]
241
242 # Indicates that the build should be optimized for debugging Rust. Note that
243 # this is typically not what you want as it takes an incredibly large amount of
244 # time to have a debug-mode rustc compile any code (notably libstd). If this
245 # value is set to `true` it will affect a number of configuration options below
246 # as well, if unconfigured.
247 #debug = false
248
249 # Whether or not to optimize the compiler and standard library
250 # Note: the slowness of the non optimized compiler compiling itself usually
251 #       outweighs the time gains in not doing optimizations, therefore a
252 #       full bootstrap takes much more time with optimize set to false.
253 #optimize = true
254
255 # Number of codegen units to use for each compiler invocation. A value of 0
256 # means "the number of cores on this machine", and 1+ is passed through to the
257 # compiler.
258 #codegen-units = 1
259
260 # Whether or not debug assertions are enabled for the compiler and standard
261 # library. Also enables compilation of debug! and trace! logging macros.
262 #debug-assertions = false
263
264 # Whether or not debuginfo is emitted
265 #debuginfo = false
266
267 # Whether or not line number debug information is emitted
268 #debuginfo-lines = false
269
270 # Whether or not to only build debuginfo for the standard library if enabled.
271 # If enabled, this will not compile the compiler with debuginfo, just the
272 # standard library.
273 #debuginfo-only-std = false
274
275 # Enable debuginfo for the extended tools: cargo, rls, rustfmt
276 # Adding debuginfo makes them several times larger.
277 #debuginfo-tools = false
278
279 # Whether or not jemalloc is built and enabled
280 #use-jemalloc = true
281
282 # Whether or not jemalloc is built with its debug option set
283 #debug-jemalloc = false
284
285 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
286 #backtrace = true
287
288 # Whether to always use incremental compilation when building rustc
289 #incremental = false
290
291 # Build rustc with experimental parallelization
292 #experimental-parallel-queries = false
293
294 # The default linker that will be hard-coded into the generated compiler for
295 # targets that don't specify linker explicitly in their target specifications.
296 # Note that this is not the linker used to link said compiler.
297 #default-linker = "cc"
298
299 # The "channel" for the Rust build to produce. The stable/beta channels only
300 # allow using stable features, whereas the nightly and dev channels allow using
301 # nightly features
302 #channel = "dev"
303
304 # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
305 # platforms to ensure that the compiler is usable by default from the build
306 # directory (as it links to a number of dynamic libraries). This may not be
307 # desired in distributions, for example.
308 #rpath = true
309
310 # Emits extraneous output from tests to ensure that failures of the test
311 # harness are debuggable just from logfiles.
312 #verbose-tests = false
313
314 # Flag indicating whether tests are compiled with optimizations (the -O flag) or
315 # with debuginfo (the -g flag)
316 #optimize-tests = true
317 #debuginfo-tests = true
318
319 # Flag indicating whether codegen tests will be run or not. If you get an error
320 # saying that the FileCheck executable is missing, you may want to disable this.
321 #codegen-tests = true
322
323 # Flag indicating whether git info will be retrieved from .git automatically.
324 # Having the git information can cause a lot of rebuilds during development.
325 # Note: If this attribute is not explicitly set (e.g. if left commented out) it
326 # will default to true if channel = "dev", but will default to false otherwise.
327 #ignore-git = true
328
329 # When creating source tarballs whether or not to create a source tarball.
330 #dist-src = false
331
332 # Whether to also run the Miri tests suite when running tests.
333 # As a side-effect also generates MIR for all libraries.
334 #test-miri = false
335
336 # After building or testing extended tools (e.g. clippy and rustfmt), append the
337 # result (broken, compiling, testing) into this JSON file.
338 #save-toolstates = "/path/to/toolstates.json"
339
340 # This is an array of the codegen backends that will be compiled for the rustc
341 # that's being compiled. The default is to only build the LLVM codegen backend,
342 # but you can also optionally enable the "emscripten" backend for asm.js or
343 # make this an empty array (but that probably won't get too far in the
344 # bootstrap)
345 #codegen-backends = ["llvm"]
346
347 # This is the name of the directory in which codegen backends will get installed
348 #codegen-backends-dir = "codegen-backends"
349
350 # Flag indicating whether `libstd` calls an imported function to handle basic IO
351 # when targeting WebAssembly. Enable this to debug tests for the `wasm32-unknown-unknown`
352 # target, as without this option the test output will not be captured.
353 #wasm-syscall = false
354
355 # Indicates whether LLD will be compiled and made available in the sysroot for
356 # rustc to execute.
357 #lld = false
358
359 # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
360 # sysroot.
361 #llvm-tools = false
362
363 # Indicates whether LLDB will be made available in the sysroot.
364 # This is only built if LLVM is also being built.
365 #lldb = false
366
367 # Whether to deny warnings in crates
368 #deny-warnings = true
369
370 # Print backtrace on internal compiler errors during bootstrap
371 #backtrace-on-ice = false
372
373 # Whether to verify generated LLVM IR
374 #verify-llvm-ir = false
375
376 # =============================================================================
377 # Options for specific targets
378 #
379 # Each of the following options is scoped to the specific target triple in
380 # question and is used for determining how to compile each target.
381 # =============================================================================
382 [target.x86_64-unknown-linux-gnu]
383
384 # C compiler to be used to compiler C code. Note that the
385 # default value is platform specific, and if not specified it may also depend on
386 # what platform is crossing to what platform.
387 #cc = "cc"
388
389 # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
390 # This is only used for host targets.
391 #cxx = "c++"
392
393 # Archiver to be used to assemble static libraries compiled from C/C++ code.
394 # Note: an absolute path should be used, otherwise LLVM build will break.
395 #ar = "ar"
396
397 # Ranlib to be used to assemble static libraries compiled from C/C++ code.
398 # Note: an absolute path should be used, otherwise LLVM build will break.
399 #ranlib = "ranlib"
400
401 # Linker to be used to link Rust code. Note that the
402 # default value is platform specific, and if not specified it may also depend on
403 # what platform is crossing to what platform.
404 #linker = "cc"
405
406 # Path to the `llvm-config` binary of the installation of a custom LLVM to link
407 # against. Note that if this is specified we don't compile LLVM at all for this
408 # target.
409 #llvm-config = "../path/to/llvm/root/bin/llvm-config"
410
411 # Path to the custom jemalloc static library to link into the standard library
412 # by default. This is only used if jemalloc is still enabled above
413 #jemalloc = "/path/to/jemalloc/libjemalloc_pic.a"
414
415 # If this target is for Android, this option will be required to specify where
416 # the NDK for the target lives. This is used to find the C compiler to link and
417 # build native code.
418 #android-ndk = "/path/to/ndk"
419
420 # Force static or dynamic linkage of the standard library for this target. If
421 # this target is a host for rustc, this will also affect the linkage of the
422 # compiler itself. This is useful for building rustc on targets that normally
423 # only use static libraries. If unset, the target's default linkage is used.
424 #crt-static = false
425
426 # The root location of the MUSL installation directory. The library directory
427 # will also need to contain libunwind.a for an unwinding implementation. Note
428 # that this option only makes sense for MUSL targets that produce statically
429 # linked binaries
430 #musl-root = "..."
431
432 # Used in testing for configuring where the QEMU images are located, you
433 # probably don't want to use this.
434 #qemu-rootfs = "..."
435
436 # =============================================================================
437 # Distribution options
438 #
439 # These options are related to distribution, mostly for the Rust project itself.
440 # You probably won't need to concern yourself with any of these options
441 # =============================================================================
442 [dist]
443
444 # This is the folder of artifacts that the build system will sign. All files in
445 # this directory will be signed with the default gpg key using the system `gpg`
446 # binary. The `asc` and `sha256` files will all be output into the standard dist
447 # output folder (currently `build/dist`)
448 #
449 # This folder should be populated ahead of time before the build system is
450 # invoked.
451 #sign-folder = "path/to/folder/to/sign"
452
453 # This is a file which contains the password of the default gpg key. This will
454 # be passed to `gpg` down the road when signing all files in `sign-folder`
455 # above. This should be stored in plaintext.
456 #gpg-password-file = "path/to/gpg/password"
457
458 # The remote address that all artifacts will eventually be uploaded to. The
459 # build system generates manifests which will point to these urls, and for the
460 # manifests to be correct they'll have to have the right URLs encoded.
461 #
462 # Note that this address should not contain a trailing slash as file names will
463 # be appended to it.
464 #upload-addr = "https://example.com/folder"
465
466 # Whether to build a plain source tarball to upload
467 # We disable that on Windows not to override the one already uploaded on S3
468 # as the one built on Windows will contain backslashes in paths causing problems
469 # on linux
470 #src-tarball = true