diff --git a/src/building/bootstrapping.md b/src/building/bootstrapping.md index 6407af5d0..093109faa 100644 --- a/src/building/bootstrapping.md +++ b/src/building/bootstrapping.md @@ -411,17 +411,17 @@ you can tell the bootstrap shim to print all env variables by adding `-vvv` to y This is an incomplete reference for the outputs generated by bootstrap: -| Stage 0 Action | Output | -|-----------------------------------------------------------|----------------------------------------------| -| `beta` extracted | `build/HOST/stage0` | -| `stage0` builds `bootstrap` | `build/bootstrap` | -| `stage0` builds `test`/`std` | `build/HOST/stage0-std/TARGET` | -| copy `stage0-std` (HOST only) | `build/HOST/stage0-sysroot/lib/rustlib/HOST` | -| `stage0` builds `rustc` with `stage0-sysroot` | `build/HOST/stage0-rustc/HOST` | -| copy `stage0-rustc` (except executable) | `build/HOST/stage0-sysroot/lib/rustlib/HOST` | -| build `llvm` | `build/HOST/llvm` | -| `stage0` builds `codegen` with `stage0-sysroot` | `build/HOST/stage0-codegen/HOST` | -| `stage0` builds `rustdoc`, `clippy`, `miri`, with `stage0-sysroot` | `build/HOST/stage0-tools/HOST` | +| Stage 0 Action | Output | +| ------------------------------------------------------------------ | -------------------------------------------- | +| `beta` extracted | `build/HOST/stage0` | +| `stage0` builds `bootstrap` | `build/bootstrap` | +| `stage0` builds `test`/`std` | `build/HOST/stage0-std/TARGET` | +| copy `stage0-std` (HOST only) | `build/HOST/stage0-sysroot/lib/rustlib/HOST` | +| `stage0` builds `rustc` with `stage0-sysroot` | `build/HOST/stage0-rustc/HOST` | +| copy `stage0-rustc` (except executable) | `build/HOST/stage0-sysroot/lib/rustlib/HOST` | +| build `llvm` | `build/HOST/llvm` | +| `stage0` builds `codegen` with `stage0-sysroot` | `build/HOST/stage0-codegen/HOST` | +| `stage0` builds `rustdoc`, `clippy`, `miri`, with `stage0-sysroot` | `build/HOST/stage0-tools/HOST` | `--stage=0` stops here. @@ -457,15 +457,15 @@ When you execute `x.py build --dry-run` command, the build output will be someth like the following: ```text -Building stage0 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) -Copying stage0 library from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu) -Building stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) -Copying stage0 rustc from stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu) -Assembling stage1 compiler (aarch64-unknown-linux-gnu) -Building stage1 library artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) -Copying stage1 library from stage1 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu / aarch64-unknown-linux-gnu) -Building stage1 tool rust-analyzer-proc-macro-srv (aarch64-unknown-linux-gnu) -Building rustdoc for stage1 (aarch64-unknown-linux-gnu) +Building stage0 library artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) +Copying stage0 library from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) +Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) +Copying stage0 rustc from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) +Assembling stage1 compiler (x86_64-unknown-linux-gnu) +Building stage1 library artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) +Copying stage1 library from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) +Building stage1 tool rust-analyzer-proc-macro-srv (x86_64-unknown-linux-gnu) +Building rustdoc for stage1 (x86_64-unknown-linux-gnu) ``` #### Building stage0 {std,test,compiler} artifacts diff --git a/src/building/suggested.md b/src/building/suggested.md index addf38f30..023fe1bb3 100644 --- a/src/building/suggested.md +++ b/src/building/suggested.md @@ -177,21 +177,32 @@ You can also use `--keep-stage 1` when running tests. Something like this: ## Incremental builds -You can configure rustbuild to use incremental compilation with the -`--incremental` flag: +Incremental compilation is enabled by default in almost all of the config profiles +under the `src/bootstrap/defaults`. + +In case if it's not enabled, you can configure rustbuild to use incremental +compilation with the `--incremental` flag: ```sh $ ./x.py build --incremental ``` -The `--incremental` flag will store incremental compilation artifacts +If you want to enable it once for all, you can apply the following configuration +in your `config.toml`: + +```toml +[rust] +incremental=true +``` + +Incremental compilation will store compilation artifacts in `build//stage0-incremental`. Note that we only use incremental compilation for the stage0 -> stage1 compilation -- this is because the stage1 compiler is changing, and we don't try to cache and reuse incremental artifacts across different versions of the compiler. -You can always drop the `--incremental` to build as normal (note that -you will still be using the downloaded beta as your bootstrap). +Note that if incremental compilation is not enabled, you will +still be using the downloaded beta as your bootstrap. ## Fine-tuning optimizations