Skip to content

Commit e4ddc21

Browse files
committed
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 6 additions & 6 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

0 commit comments

Comments
 (0)