Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
Signed-off-by: ozkanonur <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jan 27, 2023
1 parent 00c0d7e commit 7290944
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
40 changes: 20 additions & 20 deletions src/building/bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
21 changes: 16 additions & 5 deletions src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<host>/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

Expand Down

0 comments on commit 7290944

Please sign in to comment.