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