diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-06-18 18:06:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 18:06:54 +0200 |
| commit | ccacb4643dfa3d0f7c97c42a2866641648e0719c (patch) | |
| tree | db29743b7bb0655a1b8abe2d91c58030ac9698dd /src/bootstrap | |
| parent | e6e0826882f4216e9356a94730faada4786e392d (diff) | |
| parent | 48e52bb2000be6b7b406714d3dda14774575c4d5 (diff) | |
| download | rust-ccacb4643dfa3d0f7c97c42a2866641648e0719c.tar.gz rust-ccacb4643dfa3d0f7c97c42a2866641648e0719c.zip | |
Rollup merge of #142672 - Kobzol:bootstrap-tool-clarification, r=jieyouxu
Clarify bootstrap tools description The existence of `stage0-bootstrap-tools` suggests the possiblity of `stage1/N-bootstrap-tools`, but that's not really a thing. Also it doesn't fit the new bootstrap model, where `stageN` essentially means that it was built with a `stageN-1` compiler (except for std). r? ``@jieyouxu``
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/README.md | 4 | ||||
| -rw-r--r-- | src/bootstrap/src/lib.rs | 19 |
2 files changed, 17 insertions, 6 deletions
diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md index 5ff999f01a9..6ce4c6d62fa 100644 --- a/src/bootstrap/README.md +++ b/src/bootstrap/README.md @@ -105,6 +105,10 @@ build/ debuginfo/ ... + # Bootstrap host tools (which are always compiled with the stage0 compiler) + # are stored here. + bootstrap-tools/ + # Location where the stage0 Cargo and Rust compiler are unpacked. This # directory is purely an extracted and overlaid tarball of these two (done # by the bootstrap Python script). In theory, the build system does not diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index f1628f34dda..f44fe4548a1 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -246,12 +246,17 @@ pub enum Mode { /// Build a codegen backend for rustc, placing the output in the "stageN-codegen" directory. Codegen, - /// Build a tool, placing output in the "stage0-bootstrap-tools" - /// directory. This is for miscellaneous sets of tools that are built - /// using the bootstrap stage0 compiler in its entirety (target libraries - /// and all). Typically these tools compile with stable Rust. + /// Build a tool, placing output in the "bootstrap-tools" + /// directory. This is for miscellaneous sets of tools that extend + /// bootstrap. /// - /// Only works for stage 0. + /// These tools are intended to be only executed on the host system that + /// invokes bootstrap, and they thus cannot be cross-compiled. + /// + /// They are always built using the stage0 compiler, and typically they + /// can be compiled with stable Rust. + /// + /// These tools also essentially do not participate in staging. ToolBootstrap, /// Build a tool which uses the locally built std, placing output in the @@ -804,7 +809,9 @@ impl Build { Mode::Std => "-std", Mode::Rustc => "-rustc", Mode::Codegen => "-codegen", - Mode::ToolBootstrap => "-bootstrap-tools", + Mode::ToolBootstrap => { + return self.out.join(compiler.host).join("bootstrap-tools"); + } Mode::ToolStd | Mode::ToolRustc => "-tools", }; self.out.join(compiler.host).join(format!("stage{}{}", compiler.stage, suffix)) |
