Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4ddc21

Browse files
committedMar 17, 2025
replace config.toml to bootstrap.toml in src:doc:rustc-dev-guide
1 parent 277abcf commit e4ddc21

24 files changed

+56
-56
lines changed
 

‎src/backend/debugging.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ which means that LLVM assertion failures can show up as compiler crashes (not
3838
ICEs but "real" crashes) and other sorts of weird behavior. If you are
3939
encountering these, it is a good idea to try using a compiler with LLVM
4040
assertions enabled - either an "alt" nightly or a compiler you build yourself
41-
by setting `[llvm] assertions=true` in your config.toml - and see whether
41+
by setting `[llvm] assertions=true` in your bootstrap.toml - and see whether
4242
anything turns up.
4343

4444
The rustc build process builds the LLVM tools into
@@ -160,7 +160,7 @@ from `./build/<host-triple>/llvm/bin/` with the LLVM IR emitted by rustc.
160160
When investigating the implementation of LLVM itself, you should be
161161
aware of its [internal debug infrastructure][llvm-debug].
162162
This is provided in LLVM Debug builds, which you enable for rustc
163-
LLVM builds by changing this setting in the config.toml:
163+
LLVM builds by changing this setting in the bootstrap.toml:
164164
```
165165
[llvm]
166166
# Indicates whether the LLVM assertions are enabled or not

‎src/backend/updating-llvm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ so let's go through each in detail.
144144
Note that `profile = "compiler"` and other defaults set by `./x setup`
145145
download LLVM from CI instead of building it from source.
146146
You should disable this temporarily to make sure your changes are being used.
147-
This is done by having the following setting in `config.toml`:
147+
This is done by having the following setting in `bootstrap.toml`:
148148

149149
```toml
150150
[llvm]

‎src/building/compiler-documenting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ like the standard library (std) or the compiler (rustc).
3636
- Document internal rustc items
3737

3838
Compiler documentation is not built by default.
39-
To create it by default with `x doc`, modify `config.toml`:
39+
To create it by default with `x doc`, modify `bootstrap.toml`:
4040

4141
```toml
4242
[build]

‎src/building/how-to-build-and-run.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ similar to the one declared in section [What is `x.py`](#what-is-xpy), but
159159
it works as an independent process to execute the `x.py` rather than calling the
160160
shell to run the platform related scripts.
161161

162-
## Create a `config.toml`
162+
## Create a `bootstrap.toml`
163163

164164
To start, run `./x setup` and select the `compiler` defaults. This will do some initialization
165-
and create a `config.toml` for you with reasonable defaults. If you use a different default (which
165+
and create a `bootstrap.toml` for you with reasonable defaults. If you use a different default (which
166166
you'll likely want to do if you want to contribute to an area of rust other than the compiler, such
167167
as rustdoc), make sure to read information about that default (located in `src/bootstrap/defaults`)
168168
as the build process may be different for other defaults.
169169

170-
Alternatively, you can write `config.toml` by hand. See `config.example.toml` for all the available
170+
Alternatively, you can write `bootstrap.toml` by hand. See `bootstrap.example.toml` for all the available
171171
settings and explanations of them. See `src/bootstrap/defaults` for common settings to change.
172172

173173
If you have already built `rustc` and you change settings related to LLVM, then you may have to
@@ -206,7 +206,7 @@ See the chapters on
206206
Note that building will require a relatively large amount of storage space.
207207
You may want to have upwards of 10 or 15 gigabytes available to build the compiler.
208208

209-
Once you've created a `config.toml`, you are now ready to run
209+
Once you've created a `bootstrap.toml`, you are now ready to run
210210
`x`. There are a lot of options here, but let's start with what is
211211
probably the best "go to" command for building a local compiler:
212212

@@ -326,7 +326,7 @@ involve proc macros or build scripts, you must be sure to explicitly build targe
326326
host platform (in this case, `x86_64-unknown-linux-gnu`).
327327

328328
If you want to always build for other targets without needing to pass flags to `x build`,
329-
you can configure this in the `[build]` section of your `config.toml` like so:
329+
you can configure this in the `[build]` section of your `bootstrap.toml` like so:
330330

331331
```toml
332332
[build]
@@ -336,8 +336,8 @@ target = ["x86_64-unknown-linux-gnu", "wasm32-wasip1"]
336336
Note that building for some targets requires having external dependencies installed
337337
(e.g. building musl targets requires a local copy of musl).
338338
Any target-specific configuration (e.g. the path to a local copy of musl)
339-
will need to be provided by your `config.toml`.
340-
Please see `config.example.toml` for information on target-specific configuration keys.
339+
will need to be provided by your `bootstrap.toml`.
340+
Please see `bootstrap.example.toml` for information on target-specific configuration keys.
341341

342342
For examples of the complete configuration necessary to build a target, please visit
343343
[the rustc book](https://doc.rust-lang.org/rustc/platform-support.html),

‎src/building/new-target.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ able to configure Rust to treat your build as the system LLVM to avoid
3737
redundant builds.
3838

3939
You can tell Rust to use a pre-built version of LLVM using the `target` section
40-
of `config.toml`:
40+
of `bootstrap.toml`:
4141

4242
```toml
4343
[target.x86_64-unknown-linux-gnu]
@@ -55,8 +55,8 @@ for codegen tests. This tool is normally built with LLVM, but if you use your
5555
own preinstalled LLVM, you will need to provide `FileCheck` in some other way.
5656
On Debian-based systems, you can install the `llvm-N-tools` package (where `N`
5757
is the LLVM version number, e.g. `llvm-8-tools`). Alternately, you can specify
58-
the path to `FileCheck` with the `llvm-filecheck` config item in `config.toml`
59-
or you can disable codegen test with the `codegen-tests` item in `config.toml`.
58+
the path to `FileCheck` with the `llvm-filecheck` config item in `bootstrap.toml`
59+
or you can disable codegen test with the `codegen-tests` item in `bootstrap.toml`.
6060

6161
## Creating a target specification
6262

@@ -141,14 +141,14 @@ After this, run `cargo update -p libc` to update the lockfiles.
141141

142142
Beware that if you patch to a local `path` dependency, this will enable
143143
warnings for that dependency. Some dependencies are not warning-free, and due
144-
to the `deny-warnings` setting in `config.toml`, the build may suddenly start
144+
to the `deny-warnings` setting in `bootstrap.toml`, the build may suddenly start
145145
to fail.
146146
To work around warnings, you may want to:
147147
- Modify the dependency to remove the warnings
148-
- Or for local development purposes, suppress the warnings by setting deny-warnings = false in config.toml.
148+
- Or for local development purposes, suppress the warnings by setting deny-warnings = false in bootstrap.toml.
149149

150150
```toml
151-
# config.toml
151+
# bootstrap.toml
152152
[rust]
153153
deny-warnings = false
154154
```

‎src/building/optimized-build.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This page describes how you can use these approaches when building `rustc` yours
1313

1414
Link-time optimization is a powerful compiler technique that can increase program performance. To
1515
enable (Thin-)LTO when building `rustc`, set the `rust.lto` config option to `"thin"`
16-
in `config.toml`:
16+
in `bootstrap.toml`:
1717

1818
```toml
1919
[rust]
@@ -34,7 +34,7 @@ Enabling LTO on Linux has [produced] speed-ups by up to 10%.
3434

3535
Using a different memory allocator for `rustc` can provide significant performance benefits. If you
3636
want to enable the `jemalloc` allocator, you can set the `rust.jemalloc` option to `true`
37-
in `config.toml`:
37+
in `bootstrap.toml`:
3838

3939
```toml
4040
[rust]
@@ -46,7 +46,7 @@ jemalloc = true
4646
## Codegen units
4747

4848
Reducing the amount of codegen units per `rustc` crate can produce a faster build of the compiler.
49-
You can modify the number of codegen units for `rustc` and `libstd` in `config.toml` with the
49+
You can modify the number of codegen units for `rustc` and `libstd` in `bootstrap.toml` with the
5050
following options:
5151

5252
```toml
@@ -67,7 +67,7 @@ RUSTFLAGS="-C target_cpu=x86-64-v3" ./x build ...
6767
```
6868

6969
If you also want to compile LLVM for a specific instruction set, you can set `llvm` flags
70-
in `config.toml`:
70+
in `bootstrap.toml`:
7171

7272
```toml
7373
[llvm]

‎src/building/suggested.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ subsequent rebuilds:
305305
```
306306

307307
If you don't want to include the flag with every command, you can enable it in
308-
the `config.toml`:
308+
the `bootstrap.toml`:
309309

310310
```toml
311311
[rust]
@@ -384,20 +384,20 @@ ln -s ./src/tools/nix-dev-shell/envrc-shell ./.envrc # Use nix-shell
384384
### Note
385385

386386
Note that when using nix on a not-NixOS distribution, it may be necessary to set
387-
**`patch-binaries-for-nix = true` in `config.toml`**. Bootstrap tries to detect
387+
**`patch-binaries-for-nix = true` in `bootstrap.toml`**. Bootstrap tries to detect
388388
whether it's running in nix and enable patching automatically, but this
389389
detection can have false negatives.
390390

391-
You can also use your nix shell to manage `config.toml`:
391+
You can also use your nix shell to manage `bootstrap.toml`:
392392

393393
```nix
394394
let
395395
config = pkgs.writeText "rustc-config" ''
396-
# Your config.toml content goes here
396+
# Your bootstrap.toml content goes here
397397
''
398398
pkgs.mkShell {
399399
/* ... */
400-
# This environment variable tells bootstrap where our config.toml is.
400+
# This environment variable tells bootstrap where our bootstrap.toml is.
401401
RUST_BOOTSTRAP_CONFIG = config;
402402
}
403403
```

‎src/compiler-debugging.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ chapter](./backend/debugging.md)).
1111
## Configuring the compiler
1212

1313
By default, rustc is built without most debug information. To enable debug info,
14-
set `debug = true` in your config.toml.
14+
set `debug = true` in your bootstrap.toml.
1515

1616
Setting `debug = true` turns on many different debug options (e.g., `debug-assertions`,
1717
`debug-logging`, etc.) which can be individually tweaked if you want to, but many people
1818
simply set `debug = true`.
1919

20-
If you want to use GDB to debug rustc, please set `config.toml` with options:
20+
If you want to use GDB to debug rustc, please set `bootstrap.toml` with options:
2121

2222
```toml
2323
[rust]
@@ -35,14 +35,14 @@ debuginfo-level = 2
3535
3636
The default configuration will enable `symbol-mangling-version` v0.
3737
This requires at least GDB v10.2,
38-
otherwise you need to disable new symbol-mangling-version in `config.toml`.
38+
otherwise you need to disable new symbol-mangling-version in `bootstrap.toml`.
3939

4040
```toml
4141
[rust]
4242
new-symbol-mangling = false
4343
```
4444

45-
> See the comments in `config.example.toml` for more info.
45+
> See the comments in `bootstrap.example.toml` for more info.
4646
4747
You will need to rebuild the compiler after changing any configuration option.
4848

@@ -373,7 +373,7 @@ error: aborting due to previous error
373373

374374
## Configuring CodeLLDB for debugging `rustc`
375375

376-
If you are using VSCode, and have edited your `config.toml` to request debugging
376+
If you are using VSCode, and have edited your `bootstrap.toml` to request debugging
377377
level 1 or 2 for the parts of the code you're interested in, then you should be
378378
able to use the [CodeLLDB] extension in VSCode to debug it.
379379

‎src/fuzzing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ what actually results in superior throughput.
123123
You may want to build rustc from source with debug assertions to find
124124
additional bugs, though this is a trade-off: it can slow down fuzzing by
125125
requiring extra work for every execution. To enable debug assertions, add this
126-
to `config.toml` when compiling rustc:
126+
to `bootstrap.toml` when compiling rustc:
127127

128128
```toml
129129
[rust]

‎src/llvm-coverage-instrumentation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Detailed instructions and examples are documented in the
3434
[coverage map]: https://llvm.org/docs/CoverageMappingFormat.html
3535
[rustc-book-instrument-coverage]: https://doc.rust-lang.org/nightly/rustc/instrument-coverage.html
3636

37-
## Recommended `config.toml` settings
37+
## Recommended `bootstrap.toml` settings
3838

3939
When working on the coverage instrumentation code, it is usually necessary to
4040
**enable the profiler runtime** by setting `profiler = true` in `[build]`.
@@ -83,7 +83,7 @@ statically links coverage-instrumented binaries with LLVM runtime code
8383
In the `rustc` source tree,
8484
`library/profiler_builtins` bundles the LLVM `compiler-rt` code into a Rust library crate.
8585
Note that when building `rustc`,
86-
`profiler_builtins` is only included when `build.profiler = true` is set in `config.toml`.
86+
`profiler_builtins` is only included when `build.profiler = true` is set in `bootstrap.toml`.
8787

8888
When compiling with `-C instrument-coverage`,
8989
[`CrateLoader::postprocess()`][crate-loader-postprocess] dynamically loads
@@ -115,7 +115,7 @@ human-readable coverage report.
115115

116116
> Tests in `coverage-run` mode have an implicit `//@ needs-profiler-runtime`
117117
> directive, so they will be skipped if the profiler runtime has not been
118-
> [enabled in `config.toml`](#recommended-configtoml-settings).
118+
> [enabled in `bootstrap.toml`](#recommended-configtoml-settings).
119119
120120
Finally, the [`tests/codegen/instrument-coverage/testprog.rs`] test compiles a simple Rust program
121121
with `-C instrument-coverage` and compares the compiled program's LLVM IR to

‎src/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ approach is to turn [`RefCell`]s into [`Mutex`]s -- that is, we
351351
switch to thread-safe internal mutability. However, there are ongoing
352352
challenges with lock contention, maintaining query-system invariants under
353353
concurrency, and the complexity of the code base. One can try out the current
354-
work by enabling parallel compilation in `config.toml`. It's still early days,
354+
work by enabling parallel compilation in `bootstrap.toml`. It's still early days,
355355
but there are already some promising performance improvements.
356356

357357
[`RefCell`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html

‎src/profile-guided-optimization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ The `rustc` version of this can be found in `library/profiler_builtins` which
120120
basically packs the C code from `compiler-rt` into a Rust crate.
121121

122122
In order for `profiler_builtins` to be built, `profiler = true` must be set
123-
in `rustc`'s `config.toml`.
123+
in `rustc`'s `bootstrap.toml`.
124124

125125
[compiler-rt-profile]: https://github.com/llvm/llvm-project/tree/main/compiler-rt/lib/profile
126126

‎src/profiling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Example output for the compiler:
8787

8888
Since this doesn't seem to work with incremental compilation or `./x check`,
8989
you will be compiling rustc _a lot_.
90-
I recommend changing a few settings in `config.toml` to make it bearable:
90+
I recommend changing a few settings in `bootstrap.toml` to make it bearable:
9191
```
9292
[rust]
9393
# A debug build takes _a third_ as long on my machine,

‎src/profiling/with_perf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is a guide for how to profile rustc with [perf](https://perf.wiki.kernel.or
66

77
- Get a clean checkout of rust-lang/master, or whatever it is you want
88
to profile.
9-
- Set the following settings in your `config.toml`:
9+
- Set the following settings in your `bootstrap.toml`:
1010
- `debuginfo-level = 1` - enables line debuginfo
1111
- `jemalloc = false` - lets you do memory use profiling with valgrind
1212
- leave everything else the defaults

‎src/profiling/with_rustc_perf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ which will download and build the suite for you, build a local compiler toolchai
99

1010
You can use the `./x perf <command> [options]` command to use this integration.
1111

12-
You can use normal bootstrap flags for this command, such as `--stage 1` or `--stage 2`, for example to modify the stage of the created sysroot. It might also be useful to configure `config.toml` to better support profiling, e.g. set `rust.debuginfo-level = 1` to add source line information to the built compiler.
12+
You can use normal bootstrap flags for this command, such as `--stage 1` or `--stage 2`, for example to modify the stage of the created sysroot. It might also be useful to configure `bootstrap.toml` to better support profiling, e.g. set `rust.debuginfo-level = 1` to add source line information to the built compiler.
1313

1414
`x perf` currently supports the following commands:
1515
- `benchmark <id>`: Benchmark the compiler and store the results under the passed `id`.

‎src/profiling/wpa_profiling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ compiler we're using to build rustc will aid our analysis greatly by allowing WP
4444
symbols correctly. Unfortunately, the stage 0 compiler does not have symbols turned on which is why
4545
we'll need to build a stage 1 compiler and then a stage 2 compiler ourselves.
4646

47-
To do this, make sure you have set `debuginfo-level = 1` in your `config.toml` file. This tells
47+
To do this, make sure you have set `debuginfo-level = 1` in your `bootstrap.toml` file. This tells
4848
rustc to generate debug information which includes stack frames when bootstrapping.
4949

5050
Now you can build the stage 1 compiler: `x build --stage 1 -i library` or however

‎src/rustdoc.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
5858
* If you want to copy those docs to a webserver, copy all of
5959
`build/host/doc`, since that's where the CSS, JS, fonts, and landing
6060
page are.
61-
* For frontend debugging, disable the `rust.docs-minification` option in [`config.toml`].
61+
* For frontend debugging, disable the `rust.docs-minification` option in [`bootstrap.toml`].
6262
* Use `./x test tests/rustdoc*` to run the tests using a stage1
6363
rustdoc.
6464
* See [Rustdoc internals] for more information about tests.
6565

66-
[`config.toml`]: ./building/how-to-build-and-run.md
66+
[`bootstrap.toml`]: ./building/how-to-build-and-run.md
6767

6868
## Code structure
6969

‎src/sanitizers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ implementation:
3232

3333
* The sanitizer runtime libraries are part of the [compiler-rt] project, and
3434
[will be built][sanitizer-build] on [supported targets][sanitizer-targets]
35-
when enabled in `config.toml`:
35+
when enabled in `bootstrap.toml`:
3636

3737
```toml
3838
[build]
@@ -80,7 +80,7 @@ Sanitizers are validated by code generation tests in
8080
[`tests/ui/sanitizer/`][test-ui] directory.
8181

8282
Testing sanitizer functionality requires the sanitizer runtimes (built when
83-
`sanitizer = true` in `config.toml`) and target providing support for particular
83+
`sanitizer = true` in `bootstrap.toml`) and target providing support for particular
8484
sanitizer. When sanitizer is unsupported on given target, sanitizers tests will
8585
be ignored. This behaviour is controlled by compiletest `needs-sanitizer-*`
8686
directives.

‎src/tests/ci.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ To learn more about the dashboard, see the [Datadog CI docs].
435435

436436
## Determining the CI configuration
437437

438-
If you want to determine which `config.toml` settings are used in CI for a
438+
If you want to determine which `bootstrap.toml` settings are used in CI for a
439439
particular job, it is probably easiest to just look at the build log. To do
440440
this:
441441

‎src/tests/compiletest.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,10 @@ data into a human-readable code coverage report.
525525

526526
Instrumented binaries need to be linked against the LLVM profiler runtime, so
527527
`coverage-run` tests are **automatically skipped** unless the profiler runtime
528-
is enabled in `config.toml`:
528+
is enabled in `bootstrap.toml`:
529529

530530
```toml
531-
# config.toml
531+
# bootstrap.toml
532532
[build]
533533
profiler = true
534534
```

‎src/tests/directives.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ settings:
160160
stable support for `asm!`
161161
- `needs-profiler-runtime` — ignores the test if the profiler runtime was not
162162
enabled for the target
163-
(`build.profiler = true` in rustc's `config.toml`)
163+
(`build.profiler = true` in rustc's `bootstrap.toml`)
164164
- `needs-sanitizer-support` — ignores if the sanitizer support was not enabled
165-
for the target (`sanitizers = true` in rustc's `config.toml`)
165+
for the target (`sanitizers = true` in rustc's `bootstrap.toml`)
166166
- `needs-sanitizer-{address,hwaddress,leak,memory,thread}` — ignores if the
167167
corresponding sanitizer is not enabled for the target (AddressSanitizer,
168168
hardware-assisted AddressSanitizer, LeakSanitizer, MemorySanitizer or
@@ -172,7 +172,7 @@ settings:
172172
flag, or running on fuchsia.
173173
- `needs-unwind` — ignores if the target does not support unwinding
174174
- `needs-rust-lld` — ignores if the rust lld support is not enabled (`rust.lld =
175-
true` in `config.toml`)
175+
true` in `bootstrap.toml`)
176176
- `needs-threads` — ignores if the target does not have threading support
177177
- `needs-subprocess` — ignores if the target does not have subprocess support
178178
- `needs-symlink` — ignores if the target does not support symlinks. This can be
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.