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 the LLVM assertions are enabled or not
23 # Indicates whether ccache is used when building LLVM
26 # If an external LLVM root is specified, we automatically check the version by
27 # default to make sure it's within the range that we're expecting, but setting
28 # this flag will indicate that this version check should not be done.
29 #version-check = false
31 # Link libstdc++ statically into the librustc_llvm instead of relying on a
32 # dynamic version to be available.
33 #static-libstdcpp = false
35 # Tell the LLVM build system to use Ninja instead of the platform default for
36 # the generated build system. This can sometimes be faster than make, for
40 # =============================================================================
41 # General build configuration options
42 # =============================================================================
45 # Build triple for the original snapshot compiler. This must be a compiler that
46 # nightlies are already produced for. The current platform must be able to run
47 # binaries of this build triple and the nightly will be used to bootstrap the
49 #build = "x86_64-unknown-linux-gnu" # defaults to your host platform
51 # In addition to the build triple, other triples to produce full compiler
52 # toolchains for. Each of these triples will be bootstrapped from the build
53 # triple and then will continue to bootstrap themselves. This platform must
54 # currently be able to run all of the triples provided here.
55 #host = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
57 # In addition to all host triples, other triples to produce the standard library
58 # for. Each host triple will be used to produce a copy of the standard library
59 # for each target triple.
60 #target = ["x86_64-unknown-linux-gnu"] # defaults to just the build triple
62 # Instead of downloading the src/nightlies.txt version of Cargo specified, use
63 # this Cargo binary instead to build all Rust code
64 #cargo = "/path/to/bin/cargo"
66 # Instead of downloading the src/nightlies.txt version of the compiler
67 # specified, use this rustc binary instead as the stage0 snapshot compiler.
68 #rustc = "/path/to/bin/rustc"
70 # Flag to specify whether any documentation is built. If false, rustdoc and
71 # friends will still be compiled but they will not be used to generate any
75 # Indicate whether the compiler should be documented in addition to the standard
76 # library and facade crates.
77 #compiler-docs = false
79 # Indicate whether submodules are managed and updated automatically.
82 # The path to (or name of) the GDB executable to use
85 # =============================================================================
86 # Options for compiling Rust code itself
87 # =============================================================================
90 # Whether or not to optimize the compiler and standard library
93 # Number of codegen units to use for each compiler invocation. A value of 0
94 # means "the number of cores on this machine", and 1+ is passed through to the
98 # Whether or not debug assertions are enabled for the compiler and standard
100 #debug-assertions = false
102 # Whether or not debuginfo is emitted
105 # Whether or not line number debug information is emitted
106 #debuginfo-lines = false
108 # Whether or not jemalloc is built and enabled
111 # Whether or not jemalloc is built with its debug option set
112 #debug-jemalloc = false
114 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
117 # The default linker that will be used by the generated compiler. Note that this
118 # is not the linker used to link said compiler.
119 #default-linker = "cc"
121 # The default ar utility that will be used by the generated compiler if LLVM
122 # cannot be used. Note that this is not used to assemble said compiler.
125 # The "channel" for the Rust build to produce. The stable/beta channels only
126 # allow using stable features, whereas the nightly and dev channels allow using
130 # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix
131 # platforms to ensure that the compiler is usable by default from the build
132 # directory (as it links to a number of dynamic libraries). This may not be
133 # desired in distributions, for example.
136 # Flag indicating whether tests are compiled with optimizations (the -O flag) or
137 # with debuginfo (the -g flag)
138 #optimize-tests = true
139 #debuginfo-tests = true
141 # Flag indicating whether codegen tests will be run or not. If you get an error
142 # saying that the FileCheck executable is missing, you may want to disable this.
143 #codegen-tests = true
145 # =============================================================================
146 # Options for specific targets
148 # Each of the following options is scoped to the specific target triple in
149 # question and is used for determining how to compile each target.
150 # =============================================================================
151 [target.x86_64-unknown-linux-gnu]
153 # C compiler to be used to compiler C code and link Rust code. Note that the
154 # default value is platform specific, and if not specified it may also depend on
155 # what platform is crossing to what platform.
158 # C++ compiler to be used to compiler C++ code (e.g. LLVM and our LLVM shims).
159 # This is only used for host targets.
162 # Path to the `llvm-config` binary of the installation of a custom LLVM to link
163 # against. Note that if this is specifed we don't compile LLVM at all for this
165 #llvm-config = "../path/to/llvm/root/bin/llvm-config"
167 # Path to the custom jemalloc static library to link into the standard library
168 # by default. This is only used if jemalloc is still enabled above
169 #jemalloc = "/path/to/jemalloc/libjemalloc_pic.a"
171 # If this target is for Android, this option will be required to specify where
172 # the NDK for the target lives. This is used to find the C compiler to link and
174 #android-ndk = "/path/to/ndk"
176 # The root location of the MUSL installation directory. The library directory
177 # will also need to contain libunwind.a for an unwinding implementation. Note
178 # that this option only makes sense for MUSL targets that produce statically