1 # Sample TOML configuration file for building Rust.
3 # To configure rustbuild, copy this file to the directory from which you will be
4 # running the build, and name it config.toml.
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
12 # =============================================================================
13 # Tweaking how LLVM is compiled
14 # =============================================================================
17 # Indicates whether the LLVM build is a Release or Debug build
20 # Indicates whether an LLVM Release build should include debug info
21 #release-debuginfo = false
23 # Indicates whether the LLVM assertions are enabled or not
26 # Indicates whether ccache is used when building LLVM
28 # or alternatively ...
29 #ccache = "/path/to/ccache"
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
36 # Link libstdc++ statically into the librustc_llvm instead of relying on a
37 # dynamic version to be available.
38 #static-libstdcpp = false
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
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"
56 # Cap the number of parallel linker invocations when compiling LLVM.
57 # This can be useful when building LLVM with debug info, which significantly
58 # increases the size of binaries and consequently the memory required by
59 # each linker process.
60 # If absent or 0, linker invocations are treated like any other job and
61 # controlled by rustbuild's -j parameter.
64 # =============================================================================
65 # General build configuration options
66 # =============================================================================
69 # Build triple for the original snapshot compiler. This must be a compiler that
70 # nightlies are already produced for. The current platform must be able to run
71 # binaries of this build triple and the nightly will be used to bootstrap the
73 #build = "x86_64-unknown-linux-gnu" # defaults to your host platform
75 # In addition to the build triple, other triples to produce full compiler
76 # toolchains for. Each of these triples will be bootstrapped from the build
77 # triple and then will continue to bootstrap themselves. This platform must
78 # currently be able to run all of the triples provided here.
79 #host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
81 # In addition to all host triples, other triples to produce the standard library
82 # for. Each host triple will be used to produce a copy of the standard library
83 # for each target triple.
84 #target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
86 # Instead of downloading the src/nightlies.txt version of Cargo specified, use
87 # this Cargo binary instead to build all Rust code
88 #cargo = "/path/to/bin/cargo"
90 # Instead of downloading the src/nightlies.txt version of the compiler
91 # specified, use this rustc binary instead as the stage0 snapshot compiler.
92 #rustc = "/path/to/bin/rustc"
94 # Flag to specify whether any documentation is built. If false, rustdoc and
95 # friends will still be compiled but they will not be used to generate any
99 # Indicate whether the compiler should be documented in addition to the standard
100 # library and facade crates.
101 #compiler-docs = false
103 # Indicate whether submodules are managed and updated automatically.
106 # The path to (or name of) the GDB executable to use. This is only used for
107 # executing the debuginfo test suite.
110 # The node.js executable to use. Note that this is only used for the emscripten
111 # target when running tests, otherwise this can be omitted.
114 # Python interpreter to use for various tasks throughout the build, notably
115 # rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
116 # Note that Python 2 is currently required.
117 #python = "python2.7"
119 # Force Cargo to check that Cargo.lock describes the precise dependency
120 # set that all the Cargo.toml files create, instead of updating it.
123 # Indicate whether the vendored sources are used for Rust dependencies or not
126 # Typically the build system will build the rust compiler twice. The second
127 # compiler, however, will simply use its own libraries to link against. If you
128 # would rather to perform a full bootstrap, compiling the compiler three times,
129 # then you can set this option to true. You shouldn't ever need to set this
131 #full-bootstrap = false
133 # Enable a build of the and extended rust tool set which is not only the
134 # compiler but also tools such as Cargo. This will also produce "combined
135 # installers" which are used to install Rust and Cargo together. This is
136 # disabled by default.
139 # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
142 # Build the sanitizer runtimes
145 # Indicates whether the OpenSSL linked into Cargo will be statically linked or
146 # not. If static linkage is specified then the build system will download a
147 # known-good version of OpenSSL, compile it, and link it to Cargo.
148 #openssl-static = false
150 # =============================================================================
151 # General install configuration options
152 # =============================================================================
155 # Instead of installing to /usr/local, install to this path instead.
156 #prefix = "/usr/local"
158 # Where to install libraries in `prefix` above
161 # Where to install man pages in `prefix` above
162 #mandir = "share/man"
164 # Where to install documentation in `prefix` above
165 #docdir = "share/doc/rust"
167 # =============================================================================
168 # Options for compiling Rust code itself
169 # =============================================================================
172 # Whether or not to optimize the compiler and standard library
175 # Number of codegen units to use for each compiler invocation. A value of 0
176 # means "the number of cores on this machine", and 1+ is passed through to the
180 # Whether or not debug assertions are enabled for the compiler and standard
182 #debug-assertions = false
184 # Whether or not debuginfo is emitted
187 # Whether or not line number debug information is emitted
188 #debuginfo-lines = false
190 # Whether or not to only build debuginfo for the standard library if enabled.
191 # If enabled, this will not compile the compiler with debuginfo, just the
193 #debuginfo-only-std = false
195 # Whether or not jemalloc is built and enabled
198 # Whether or not jemalloc is built with its debug option set
199 #debug-jemalloc = false
201 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
204 # The default linker that will be used by the generated compiler. Note that this
205 # is not the linker used to link said compiler.
206 #default-linker = "cc"
208 # The default ar utility that will be used by the generated compiler if LLVM
209 # cannot be used. Note that this is not used to assemble said compiler.
212 # The "channel" for the Rust build to produce. The stable/beta channels only
213 # allow using stable features, whereas the nightly and dev channels allow using
217 # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
218 # platforms to ensure that the compiler is usable by default from the build
219 # directory (as it links to a number of dynamic libraries). This may not be
220 # desired in distributions, for example.
223 # Flag indicating whether tests are compiled with optimizations (the -O flag) or
224 # with debuginfo (the -g flag)
225 #optimize-tests = true
226 #debuginfo-tests = true
228 # Flag indicating whether codegen tests will be run or not. If you get an error
229 # saying that the FileCheck executable is missing, you may want to disable this.
230 #codegen-tests = true
232 # =============================================================================
233 # Options for specific targets
235 # Each of the following options is scoped to the specific target triple in
236 # question and is used for determining how to compile each target.
237 # =============================================================================
238 [target.x86_64-unknown-linux-gnu]
240 # C compiler to be used to compiler C code and link Rust code. Note that the
241 # default value is platform specific, and if not specified it may also depend on
242 # what platform is crossing to what platform.
245 # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
246 # This is only used for host targets.
249 # Path to the `llvm-config` binary of the installation of a custom LLVM to link
250 # against. Note that if this is specifed we don't compile LLVM at all for this
252 #llvm-config = "../path/to/llvm/root/bin/llvm-config"
254 # Path to the custom jemalloc static library to link into the standard library
255 # by default. This is only used if jemalloc is still enabled above
256 #jemalloc = "/path/to/jemalloc/libjemalloc_pic.a"
258 # If this target is for Android, this option will be required to specify where
259 # the NDK for the target lives. This is used to find the C compiler to link and
261 #android-ndk = "/path/to/ndk"
263 # The root location of the MUSL installation directory. The library directory
264 # will also need to contain libunwind.a for an unwinding implementation. Note
265 # that this option only makes sense for MUSL targets that produce statically
269 # =============================================================================
270 # Distribution options
272 # These options are related to distribution, mostly for the Rust project itself.
273 # You probably won't need to concern yourself with any of these options
274 # =============================================================================
277 # This is the folder of artifacts that the build system will sign. All files in
278 # this directory will be signed with the default gpg key using the system `gpg`
279 # binary. The `asc` and `sha256` files will all be output into the standard dist
280 # output folder (currently `build/dist`)
282 # This folder should be populated ahead of time before the build system is
284 #sign-folder = "path/to/folder/to/sign"
286 # This is a file which contains the password of the default gpg key. This will
287 # be passed to `gpg` down the road when signing all files in `sign-folder`
288 # above. This should be stored in plaintext.
289 #gpg-password-file = "path/to/gpg/password"
291 # The remote address that all artifacts will eventually be uploaded to. The
292 # build system generates manifests which will point to these urls, and for the
293 # manifests to be correct they'll have to have the right URLs encoded.
295 # Note that this address should not contain a trailing slash as file names will
297 #upload-addr = "https://example.com/folder"