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