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