@@ -28,14 +28,14 @@ compiler. What actually happens when you invoke bootstrap is:
2828 ` x.py ` cross-platform) is run. This script is responsible for downloading the stage0
2929 compiler/Cargo binaries, and it then compiles the build system itself (this folder).
3030 Finally, it then invokes the actual ` bootstrap ` binary build system.
31- 2 . In Rust, ` bootstrap ` will slurp up all configuration, perform a number of
32- sanity checks (whether compilers exist, for example ), and then start building the
33- stage0 artifacts .
34- 3 . The stage0 ` cargo ` , downloaded earlier, is used to build the standard library
35- and the compiler, and then these binaries are then copied to the ` stage1 `
36- directory. That compiler is then used to generate the stage1 artifacts which
37- are then copied to the stage2 directory, and then finally, the stage2
38- artifacts are generated using that compiler .
31+ 2 . In Rust, the bootstrap binary reads all configuration, performs a number of sanity
32+ checks (for example, verifying toolchains and paths ), and then prepares to build the
33+ stage 1 compiler and libraries using the prebuilt stage 0 compiler .
34+ 3 . The stage 0 compiler and standard library , downloaded earlier, are used to build the
35+ stage 1 compiler, which links against the stage 0 standard library. The newly built stage 1
36+ compiler is then used to build the stage 1 standard library. After that, the stage 1
37+ compiler is used once more to produce the stage 2 compiler, which links against the
38+ stage 1 standard library .
3939
4040The goal of each stage is to (a) leverage Cargo as much as possible and failing
4141that (b) leverage Rust as much as possible!
@@ -167,7 +167,6 @@ build/
167167 # no extra build output in these directories.
168168 stage1/
169169 stage2/
170- stage3/
171170```
172171
173172## Extending bootstrap
@@ -177,8 +176,9 @@ When you use bootstrap, you'll call it through the entry point script
177176` bootstrap ` has a difficult problem: it is written in Rust, but yet it is run
178177before the Rust compiler is built! To work around this, there are two components
179178of bootstrap: the main one written in rust, and ` bootstrap.py ` . ` bootstrap.py `
180- is what gets run by entry point script. It takes care of downloading the ` stage0 `
181- compiler, which will then build the bootstrap binary written in Rust.
179+ is what gets run by entry point script. It takes care of downloading the prebuilt
180+ stage 0 compiler, std and Cargo binaries, which are then used to build the
181+ bootstrap binary.
182182
183183Because there are two separate codebases behind ` x.py ` , they need to
184184be kept in sync. In particular, both ` bootstrap.py ` and the bootstrap binary
0 commit comments