Skip to content

Commit ebe6c4c

Browse files
committed
update the bootstrap readme
1 parent 20f1c04 commit ebe6c4c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/bootstrap/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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 beta 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

4040
The goal of each stage is to (a) leverage Cargo as much as possible and failing
4141
that (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
178177
before the Rust compiler is built! To work around this, there are two components
179178
of 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

183183
Because there are two separate codebases behind `x.py`, they need to
184184
be kept in sync. In particular, both `bootstrap.py` and the bootstrap binary

0 commit comments

Comments
 (0)