]> git.proxmox.com Git - rustc.git/blame - src/bootstrap/config.toml.example
New upstream version 1.20.0+dfsg1
[rustc.git] / src / bootstrap / config.toml.example
CommitLineData
a7813a04
XL
1# Sample TOML configuration file for building Rust.
2#
9e0c209e
SL
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#
a7813a04
XL
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
476ff2be
SL
20# Indicates whether an LLVM Release build should include debug info
21#release-debuginfo = false
22
a7813a04
XL
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
476ff2be
SL
28# or alternatively ...
29#ccache = "/path/to/ccache"
a7813a04
XL
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 = false
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
32a655c1
SL
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!
7cac9316 54#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon"
32a655c1 55
041b39d2
XL
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. Possible
60# experimental LLVM targets include WebAssembly for the
61# wasm32-experimental-emscripten Rust target.
62#experimental-targets = ""
63
8bb4bdeb
XL
64# Cap the number of parallel linker invocations when compiling LLVM.
65# This can be useful when building LLVM with debug info, which significantly
66# increases the size of binaries and consequently the memory required by
67# each linker process.
68# If absent or 0, linker invocations are treated like any other job and
69# controlled by rustbuild's -j parameter.
70#link-jobs = 0
71
72# Delete LLVM build directory on LLVM rebuild.
73# This option defaults to `false` for local development, but CI may want to
74# always perform clean full builds (possibly accelerated by (s)ccache).
75#clean-rebuild = false
76
a7813a04
XL
77# =============================================================================
78# General build configuration options
79# =============================================================================
80[build]
81
82# Build triple for the original snapshot compiler. This must be a compiler that
83# nightlies are already produced for. The current platform must be able to run
84# binaries of this build triple and the nightly will be used to bootstrap the
85# first compiler.
86#build = "x86_64-unknown-linux-gnu" # defaults to your host platform
87
88# In addition to the build triple, other triples to produce full compiler
89# toolchains for. Each of these triples will be bootstrapped from the build
90# triple and then will continue to bootstrap themselves. This platform must
91# currently be able to run all of the triples provided here.
92#host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
93
94# In addition to all host triples, other triples to produce the standard library
95# for. Each host triple will be used to produce a copy of the standard library
96# for each target triple.
97#target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
98
cc61c64b 99# Instead of downloading the src/stage0.txt version of Cargo specified, use
a7813a04
XL
100# this Cargo binary instead to build all Rust code
101#cargo = "/path/to/bin/cargo"
102
cc61c64b 103# Instead of downloading the src/stage0.txt version of the compiler
a7813a04
XL
104# specified, use this rustc binary instead as the stage0 snapshot compiler.
105#rustc = "/path/to/bin/rustc"
106
107# Flag to specify whether any documentation is built. If false, rustdoc and
108# friends will still be compiled but they will not be used to generate any
109# documentation.
110#docs = true
111
112# Indicate whether the compiler should be documented in addition to the standard
113# library and facade crates.
114#compiler-docs = false
115
c30ab7b3
SL
116# Indicate whether submodules are managed and updated automatically.
117#submodules = true
118
476ff2be
SL
119# The path to (or name of) the GDB executable to use. This is only used for
120# executing the debuginfo test suite.
c30ab7b3
SL
121#gdb = "gdb"
122
476ff2be
SL
123# The node.js executable to use. Note that this is only used for the emscripten
124# target when running tests, otherwise this can be omitted.
125#nodejs = "node"
126
127# Python interpreter to use for various tasks throughout the build, notably
128# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
129# Note that Python 2 is currently required.
130#python = "python2.7"
131
8bb4bdeb
XL
132# Force Cargo to check that Cargo.lock describes the precise dependency
133# set that all the Cargo.toml files create, instead of updating it.
134#locked-deps = false
135
476ff2be
SL
136# Indicate whether the vendored sources are used for Rust dependencies or not
137#vendor = false
138
32a655c1
SL
139# Typically the build system will build the rust compiler twice. The second
140# compiler, however, will simply use its own libraries to link against. If you
141# would rather to perform a full bootstrap, compiling the compiler three times,
142# then you can set this option to true. You shouldn't ever need to set this
143# option to true.
144#full-bootstrap = false
145
146# Enable a build of the and extended rust tool set which is not only the
147# compiler but also tools such as Cargo. This will also produce "combined
148# installers" which are used to install Rust and Cargo together. This is
149# disabled by default.
150#extended = false
151
8bb4bdeb
XL
152# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
153#verbose = 0
154
155# Build the sanitizer runtimes
156#sanitizers = false
157
041b39d2
XL
158# Build the profiler runtime
159#profiler = false
160
8bb4bdeb
XL
161# Indicates whether the OpenSSL linked into Cargo will be statically linked or
162# not. If static linkage is specified then the build system will download a
163# known-good version of OpenSSL, compile it, and link it to Cargo.
164#openssl-static = false
165
7cac9316
XL
166# Run the build with low priority, by setting the process group's "nice" value
167# to +10 on Unix platforms, and by using a "low priority" job object on Windows.
168#low-priority = false
169
32a655c1
SL
170# =============================================================================
171# General install configuration options
172# =============================================================================
173[install]
174
175# Instead of installing to /usr/local, install to this path instead.
176#prefix = "/usr/local"
177
7cac9316
XL
178# Where to install system configuration files
179# If this is a relative path, it will get installed in `prefix` above
180#sysconfdir = "/etc"
181
182# Where to install documentation in `prefix` above
183#docdir = "share/doc/rust"
184
185# Where to install binaries in `prefix` above
186#bindir = "bin"
187
32a655c1
SL
188# Where to install libraries in `prefix` above
189#libdir = "lib"
190
191# Where to install man pages in `prefix` above
192#mandir = "share/man"
193
a7813a04
XL
194# =============================================================================
195# Options for compiling Rust code itself
196# =============================================================================
197[rust]
198
199# Whether or not to optimize the compiler and standard library
7cac9316
XL
200# Note: the slowness of the non optimized compiler compiling itself usually
201# outweighs the time gains in not doing optimizations, therefore a
202# full bootstrap takes much more time with optimize set to false.
a7813a04
XL
203#optimize = true
204
205# Number of codegen units to use for each compiler invocation. A value of 0
206# means "the number of cores on this machine", and 1+ is passed through to the
207# compiler.
208#codegen-units = 1
209
210# Whether or not debug assertions are enabled for the compiler and standard
211# library
212#debug-assertions = false
213
214# Whether or not debuginfo is emitted
215#debuginfo = false
216
c30ab7b3
SL
217# Whether or not line number debug information is emitted
218#debuginfo-lines = false
219
476ff2be
SL
220# Whether or not to only build debuginfo for the standard library if enabled.
221# If enabled, this will not compile the compiler with debuginfo, just the
222# standard library.
223#debuginfo-only-std = false
224
a7813a04
XL
225# Whether or not jemalloc is built and enabled
226#use-jemalloc = true
227
228# Whether or not jemalloc is built with its debug option set
229#debug-jemalloc = false
230
5bcae85e
SL
231# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
232#backtrace = true
233
a7813a04
XL
234# The default linker that will be used by the generated compiler. Note that this
235# is not the linker used to link said compiler.
236#default-linker = "cc"
237
238# The default ar utility that will be used by the generated compiler if LLVM
239# cannot be used. Note that this is not used to assemble said compiler.
240#default-ar = "ar"
241
242# The "channel" for the Rust build to produce. The stable/beta channels only
243# allow using stable features, whereas the nightly and dev channels allow using
244# nightly features
245#channel = "dev"
246
a7813a04
XL
247# By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
248# platforms to ensure that the compiler is usable by default from the build
249# directory (as it links to a number of dynamic libraries). This may not be
250# desired in distributions, for example.
251#rpath = true
252
253# Flag indicating whether tests are compiled with optimizations (the -O flag) or
254# with debuginfo (the -g flag)
255#optimize-tests = true
256#debuginfo-tests = true
257
9e0c209e
SL
258# Flag indicating whether codegen tests will be run or not. If you get an error
259# saying that the FileCheck executable is missing, you may want to disable this.
260#codegen-tests = true
261
a7813a04
XL
262# =============================================================================
263# Options for specific targets
264#
265# Each of the following options is scoped to the specific target triple in
266# question and is used for determining how to compile each target.
267# =============================================================================
268[target.x86_64-unknown-linux-gnu]
269
270# C compiler to be used to compiler C code and link Rust code. Note that the
271# default value is platform specific, and if not specified it may also depend on
272# what platform is crossing to what platform.
273#cc = "cc"
274
275# C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
276# This is only used for host targets.
277#cxx = "c++"
278
279# Path to the `llvm-config` binary of the installation of a custom LLVM to link
280# against. Note that if this is specifed we don't compile LLVM at all for this
281# target.
282#llvm-config = "../path/to/llvm/root/bin/llvm-config"
283
284# Path to the custom jemalloc static library to link into the standard library
285# by default. This is only used if jemalloc is still enabled above
286#jemalloc = "/path/to/jemalloc/libjemalloc_pic.a"
287
288# If this target is for Android, this option will be required to specify where
289# the NDK for the target lives. This is used to find the C compiler to link and
290# build native code.
291#android-ndk = "/path/to/ndk"
9e0c209e
SL
292
293# The root location of the MUSL installation directory. The library directory
294# will also need to contain libunwind.a for an unwinding implementation. Note
295# that this option only makes sense for MUSL targets that produce statically
296# linked binaries
297#musl-root = "..."
32a655c1
SL
298
299# =============================================================================
300# Distribution options
301#
302# These options are related to distribution, mostly for the Rust project itself.
303# You probably won't need to concern yourself with any of these options
304# =============================================================================
305[dist]
306
307# This is the folder of artifacts that the build system will sign. All files in
308# this directory will be signed with the default gpg key using the system `gpg`
309# binary. The `asc` and `sha256` files will all be output into the standard dist
310# output folder (currently `build/dist`)
311#
312# This folder should be populated ahead of time before the build system is
313# invoked.
314#sign-folder = "path/to/folder/to/sign"
315
316# This is a file which contains the password of the default gpg key. This will
317# be passed to `gpg` down the road when signing all files in `sign-folder`
318# above. This should be stored in plaintext.
319#gpg-password-file = "path/to/gpg/password"
320
321# The remote address that all artifacts will eventually be uploaded to. The
322# build system generates manifests which will point to these urls, and for the
323# manifests to be correct they'll have to have the right URLs encoded.
324#
325# Note that this address should not contain a trailing slash as file names will
326# be appended to it.
327#upload-addr = "https://example.com/folder"
7cac9316
XL
328
329# Whether to build a plain source tarball to upload
330# We disable that on Windows not to override the one already uploaded on S3
331# as the one built on Windows will contain backslashes in paths causing problems
332# on linux
333#src-tarball = true