From e2ad700c74fdae00b7b02cb2e8fc0a3466b4fd38 Mon Sep 17 00:00:00 2001 From: Mattias Petersson Date: Thu, 27 Nov 2025 20:22:51 +0100 Subject: [PATCH 1/2] Specify toolchain part in building and running There was an issue raised that the toolchain explanation for building and running the compiler needed some refinement. This patch aims to remedy that by specifying what "first" and "second" refer to, and what the toolchain does. Small change to the language to specify that the stage2 toolchain is not built, and how one would build it. --- src/building/how-to-build-and-run.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/building/how-to-build-and-run.md b/src/building/how-to-build-and-run.md index c924216b8..b15d77111 100644 --- a/src/building/how-to-build-and-run.md +++ b/src/building/how-to-build-and-run.md @@ -277,18 +277,20 @@ default). Once you have successfully built `rustc`, you will have created a bunch of files in your `build` directory. In order to actually run the resulting `rustc`, we recommend creating rustup toolchains. The first -one will run the stage1 compiler (which we built above). The second -will execute the stage2 compiler (which we did not build, but which -you will likely need to build at some point; for example, if you want -to run the entire test suite). +command listed below runs the stage1 compiler, which was built in the +steps above, with the name `stage1`. The second command runs the stage2 +compiler using the stage1 compiler. This will be needed in the future +if running the entire test suite, but will not be built in this page. +Building stage2 is done with the same `./x build` command as for stage1, +specifying that the stage is 2 instead. ```bash rustup toolchain link stage1 build/host/stage1 rustup toolchain link stage2 build/host/stage2 ``` -Now you can run the `rustc` you built with. If you run with `-vV`, you -should see a version number ending in `-dev`, indicating a build from +Now you can run the `rustc` you built with via the toolchain. If you run with +`-vV`, you should see a version number ending in `-dev`, indicating a build from your local environment: ```bash From 6da2ecdcd8ed3690dcb038e4636993778ba9cf50 Mon Sep 17 00:00:00 2001 From: Mattias Petersson <61464624+Mattias-Petersson@users.noreply.github.com> Date: Fri, 28 Nov 2025 07:44:24 +0100 Subject: [PATCH 2/2] Update src/building/how-to-build-and-run.md Co-authored-by: Tshepang Mbambo --- src/building/how-to-build-and-run.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/building/how-to-build-and-run.md b/src/building/how-to-build-and-run.md index b15d77111..d0a38b12c 100644 --- a/src/building/how-to-build-and-run.md +++ b/src/building/how-to-build-and-run.md @@ -277,9 +277,9 @@ default). Once you have successfully built `rustc`, you will have created a bunch of files in your `build` directory. In order to actually run the resulting `rustc`, we recommend creating rustup toolchains. The first -command listed below runs the stage1 compiler, which was built in the -steps above, with the name `stage1`. The second command runs the stage2 -compiler using the stage1 compiler. This will be needed in the future +command listed below creates the stage1 toolchain, which was built in the +steps above, with the name `stage1`. The second command creates the stage2 +toolchain using the stage1 compiler. This will be needed in the future if running the entire test suite, but will not be built in this page. Building stage2 is done with the same `./x build` command as for stage1, specifying that the stage is 2 instead.