Skip to content

Commit 6be97a0

Browse files
committed
Clarify bootstrap tool description and change its directory to simply bootstrap-tools
1 parent 6f935a0 commit 6be97a0

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

src/bootstrap/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ build/
105105
debuginfo/
106106
...
107107

108+
# Bootstrap host tools (which are always compiled with the stage0 compiler)
109+
# are stored here.
110+
bootstrap-tools/
111+
108112
# Location where the stage0 Cargo and Rust compiler are unpacked. This
109113
# directory is purely an extracted and overlaid tarball of these two (done
110114
# by the bootstrap Python script). In theory, the build system does not

src/bootstrap/src/lib.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,17 @@ pub enum Mode {
246246
/// Build a codegen backend for rustc, placing the output in the "stageN-codegen" directory.
247247
Codegen,
248248

249-
/// Build a tool, placing output in the "stage0-bootstrap-tools"
250-
/// directory. This is for miscellaneous sets of tools that are built
251-
/// using the bootstrap stage0 compiler in its entirety (target libraries
252-
/// and all). Typically these tools compile with stable Rust.
249+
/// Build a tool, placing output in the "bootstrap-tools"
250+
/// directory. This is for miscellaneous sets of tools that extend
251+
/// bootstrap.
253252
///
254-
/// Only works for stage 0.
253+
/// These tools are intended to be only executed on the host system that
254+
/// invokes bootstrap, and they thus cannot be cross-compiled.
255+
///
256+
/// They are always built using the stage0 compiler, and typically they
257+
/// can be compiled with stable Rust.
258+
///
259+
/// These tools also essentially do not participate in staging.
255260
ToolBootstrap,
256261

257262
/// Build a tool which uses the locally built std, placing output in the
@@ -804,7 +809,9 @@ impl Build {
804809
Mode::Std => "-std",
805810
Mode::Rustc => "-rustc",
806811
Mode::Codegen => "-codegen",
807-
Mode::ToolBootstrap => "-bootstrap-tools",
812+
Mode::ToolBootstrap => {
813+
return self.out.join(compiler.host).join("bootstrap-tools");
814+
}
808815
Mode::ToolStd | Mode::ToolRustc => "-tools",
809816
};
810817
self.out.join(compiler.host).join(format!("stage{}{}", compiler.stage, suffix))

0 commit comments

Comments
 (0)