Skip to content

Rename sysroot directories in docs #1510

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
22 changes: 11 additions & 11 deletions src/building/bootstrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ manually. Otherwise, you get an error like the following:
thread 'main' panicked at 'RUSTC_STAGE was not set: NotPresent', library/core/src/result.rs:1165:5
```

If `./stageN/bin/rustc` gives an error about environment variables, that
If `./stageN-sysroot/bin/rustc` gives an error about environment variables, that
usually means something is quite wrong -- or you're trying to compile e.g.
`rustc` or `std` or something that depends on environment variables. In
the unlikely case that you actually need to invoke rustc in such a situation,
Expand All @@ -413,7 +413,7 @@ This is an incomplete reference for the outputs generated by bootstrap:

| Stage 0 Action | Output |
|-----------------------------------------------------------|----------------------------------------------|
| `beta` extracted | `build/HOST/stage0` |
| `beta` extracted | `build/HOST/bootstrap-sysroot` |
| `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` |
Expand All @@ -427,24 +427,24 @@ This is an incomplete reference for the outputs generated by bootstrap:

| Stage 1 Action | Output |
|-----------------------------------------------------|---------------------------------------|
| copy (uplift) `stage0-rustc` executable to `stage1` | `build/HOST/stage1/bin` |
| copy (uplift) `stage0-codegen` to `stage1` | `build/HOST/stage1/lib` |
| copy (uplift) `stage0-sysroot` to `stage1` | `build/HOST/stage1/lib` |
| copy (uplift) `stage0-rustc` executable to `stage1` | `build/HOST/stage1-sysroot/bin` |
| copy (uplift) `stage0-codegen` to `stage1` | `build/HOST/stage1-sysroot/lib` |
| copy (uplift) `stage0-sysroot` to `stage1` | `build/HOST/stage1-sysroot/lib` |
| `stage1` builds `test`/`std` | `build/HOST/stage1-std/TARGET` |
| copy `stage1-std` (HOST only) | `build/HOST/stage1/lib/rustlib/HOST` |
| copy `stage1-std` (HOST only) | `build/HOST/stage1-sysroot/lib/rustlib/HOST` |
| `stage1` builds `rustc` | `build/HOST/stage1-rustc/HOST` |
| copy `stage1-rustc` (except executable) | `build/HOST/stage1/lib/rustlib/HOST` |
| copy `stage1-rustc` (except executable) | `build/HOST/stage1-sysroot/lib/rustlib/HOST` |
| `stage1` builds `codegen` | `build/HOST/stage1-codegen/HOST` |

`--stage=1` stops here.

| Stage 2 Action | Output |
|--------------------------------------------------------|-----------------------------------------------------------------|
| copy (uplift) `stage1-rustc` executable | `build/HOST/stage2/bin` |
| copy (uplift) `stage1-sysroot` | `build/HOST/stage2/lib and build/HOST/stage2/lib/rustlib/HOST` |
| copy (uplift) `stage1-rustc` executable | `build/HOST/stage2-sysroot/bin` |
| copy (uplift) `stage1-sysroot` | `build/HOST/stage2-sysroot/lib and build/HOST/stage2/lib/rustlib/HOST` |
| `stage2` builds `test`/`std` (not HOST targets) | `build/HOST/stage2-std/TARGET` |
| copy `stage2-std` (not HOST targets) | `build/HOST/stage2/lib/rustlib/TARGET` |
| copy `stage2-std` (not HOST targets) | `build/HOST/stage2-sysroot/lib/rustlib/TARGET` |
| `stage2` builds `rustdoc`, `clippy`, `miri` | `build/HOST/stage2-tools/HOST` |
| copy `rustdoc` | `build/HOST/stage2/bin` |
| copy `rustdoc` | `build/HOST/stage2-sysroot/bin` |

`--stage=2` stops here.
4 changes: 2 additions & 2 deletions src/building/how-to-build-and-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ you will likely need to build at some point; for example, if you want
to run the entire test suite).

```bash
rustup toolchain link stage1 build/<host-triple>/stage1
rustup toolchain link stage2 build/<host-triple>/stage2
rustup toolchain link stage1 build/<host-triple>/stage1-sysroot
rustup toolchain link stage2 build/<host-triple>/stage2-sysroot
```

The `<host-triple>` would typically be one of the following:
Expand Down
2 changes: 1 addition & 1 deletion src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ you can write: <!-- date-check: apr 2022 --><!-- the date comment is for the edi
"--json-output"
],
"rust-analyzer.rustfmt.overrideCommand": [
"./build/$TARGET_TRIPLE/stage0/bin/rustfmt",
"./build/$TARGET_TRIPLE/bootstrap-sysroot/bin/rustfmt",
"--edition=2021"
],
"rust-analyzer.procMacro.server": "./build/$TARGET_TRIPLE/stage0/libexec/rust-analyzer-proc-macro-srv",
Expand Down
2 changes: 1 addition & 1 deletion src/closure.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ This uses the stage1 compiler and enables `debug!` logging for the

The other option is to step through the code using lldb or gdb.

1. `rust-lldb build/x86_64-apple-darwin/stage1/bin/rustc test.rs`
1. `rust-lldb $(rustup which rustc --toolchain stage1) test.rs`
2. In lldb:
1. `b upvar.rs:134` // Setting the breakpoint on a certain line in the upvar.rs file`
2. `r` // Run the program until it hits the breakpoint
Expand Down
2 changes: 1 addition & 1 deletion src/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Formatting is checked by the `tidy` script. It runs automatically when you do
`./x.py test` and can be run in isolation with `./x.py fmt --check`.

If you want to use format-on-save in your editor, the pinned version of
`rustfmt` is built under `build/<target>/stage0/bin/rustfmt`. You'll have to
`rustfmt` is built under `build/<target>/bootstrap-sysroot/bin/rustfmt`. You'll have to
pass the <!-- date-check: April 2022 --> `--edition=2021` argument yourself when calling
`rustfmt` directly.

Expand Down
2 changes: 1 addition & 1 deletion src/rustdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ does is call the `main()` that's in this crate's `lib.rs`, though.)
* Use `./x.py build` to make a usable
rustdoc you can run on other projects.
* Add `library/test` to be able to use `rustdoc --test`.
* Run `rustup toolchain link stage2 build/$TARGET/stage2` to add a
* Run `rustup toolchain link stage2 build/$TARGET/stage2-sysroot` to add a
custom toolchain called `stage2` to your rustup environment. After
running that, `cargo +stage2 doc` in any directory will build with
your locally-compiled rustdoc.
Expand Down