Skip to content
Merged
Changes from all 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
17 changes: 9 additions & 8 deletions src/building/how-to-build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,17 @@ Once you've created a `bootstrap.toml`, you are now ready to run
`x`. There are a lot of options here, but let's start with what is
probably the best "go to" command for building a local compiler:

```bash
./x build library
```console
./x build rustc
```

This may *look* like it only builds the standard library, but that is not the case.
What this command does is the following:
What this command does is build `rustc` using the stage0 compiler and stage0 `std`.

To build `rustc` with the in-tree `std`, use this command instead:

- Build `rustc` using the stage0 compiler
- This produces the stage1 compiler
- Build `std` using the stage1 compiler
```console
./x build rustc --stage 2
```

This final product (stage1 compiler + libs built using that compiler)
is what you need to build other Rust programs (unless you use `#![no_std]` or
Expand All @@ -253,7 +254,7 @@ signature of some function, you can use `./x check` instead for a much faster bu

Note that this whole command just gives you a subset of the full `rustc`
build. The **full** `rustc` build (what you get with `./x build
--stage 2 compiler/rustc`) has quite a few more steps:
--stage 2 rustc`) has quite a few more steps:

- Build `rustc` with the stage1 compiler.
- The resulting compiler here is called the "stage2" compiler, which uses stage1 std from the previous command.
Expand Down