]> git.lizzy.rs Git - rust.git/blob - src/bootstrap/config.toml.example
1289cdba59577a03ca852f24fc6095e083a42a2d
[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 the LLVM assertions are enabled or not
21 #assertions = false
22
23 # Indicates whether ccache is used when building LLVM
24 #ccache = false
25
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
30
31 # Link libstdc++ statically into the librustc_llvm instead of relying on a
32 # dynamic version to be available.
33 #static-libstdcpp = false
34
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
37 # example.
38 #ninja = false
39
40 # =============================================================================
41 # General build configuration options
42 # =============================================================================
43 [build]
44
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
48 # first compiler.
49 #build = "x86_64-unknown-linux-gnu"    # defaults to your host platform
50
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
56
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
61
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"
65
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"
69
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
72 # documentation.
73 #docs = true
74
75 # Indicate whether the compiler should be documented in addition to the standard
76 # library and facade crates.
77 #compiler-docs = false
78
79 # Indicate whether submodules are managed and updated automatically.
80 #submodules = true
81
82 # The path to (or name of) the GDB executable to use
83 #gdb = "gdb"
84
85 # =============================================================================
86 # Options for compiling Rust code itself
87 # =============================================================================
88 [rust]
89
90 # Whether or not to optimize the compiler and standard library
91 #optimize = true
92
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
95 # compiler.
96 #codegen-units = 1
97
98 # Whether or not debug assertions are enabled for the compiler and standard
99 # library
100 #debug-assertions = false
101
102 # Whether or not debuginfo is emitted
103 #debuginfo = false
104
105 # Whether or not line number debug information is emitted
106 #debuginfo-lines = false
107
108 # Whether or not jemalloc is built and enabled
109 #use-jemalloc = true
110
111 # Whether or not jemalloc is built with its debug option set
112 #debug-jemalloc = false
113
114 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
115 #backtrace = true
116
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"
120
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.
123 #default-ar = "ar"
124
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
127 # nightly features
128 #channel = "dev"
129
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.
134 #rpath = true
135
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
140
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
144
145 # =============================================================================
146 # Options for specific targets
147 #
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]
152
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.
156 #cc = "cc"
157
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.
160 #cxx = "c++"
161
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
164 # target.
165 #llvm-config = "../path/to/llvm/root/bin/llvm-config"
166
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"
170
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
173 # build native code.
174 #android-ndk = "/path/to/ndk"
175
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
179 # linked binaries
180 #musl-root = "..."