Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link directly to the section on --keep-stage #1515

Merged
merged 3 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/building/how-to-build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ is what you need to build other Rust programs (unless you use `#![no_std]` or

You will probably find that building the stage1 `std` is a bottleneck for you,
but fear not, there is a (hacky) workaround...
see [the section on "recommended workflows"](./suggested.md) below.
see [the section on avoiding rebuilds for std][keep-stage].

[keep-stage]: ./suggested.md#incremental-builds-with---keep-stage
jyn514 marked this conversation as resolved.
Show resolved Hide resolved

Note that this whole command just gives you a subset of the full `rustc`
build. The **full** `rustc` build (what you get with `./x.py build
Expand Down
4 changes: 2 additions & 2 deletions src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ lets you use `cargo fmt`.
[the section on vscode]: suggested.md#configuring-rust-analyzer-for-rustc
[the section on rustup]: how-to-build-and-run.md?highlight=rustup#creating-a-rustup-toolchain

## Incremental builds with `--keep-stage`.
## Faster builds with `--keep-stage`.

Sometimes just checking
whether the compiler builds is not enough. A common example is that
you need to add a `debug!` statement to inspect the value of some
state or better understand the problem. In that case, you really need
a full build. By leveraging incremental, though, you can often get
a full build. By bypassing bootstrap's cache invalidation, you can often get
these builds to complete very fast (e.g., around 30 seconds). The only
catch is this requires a bit of fudging and may produce compilers that
don't work (but that is easily detected and fixed).
Expand Down