Skip to content

Commit 8d4cf2d

Browse files
authored
Unrolled build for #146608
Rollup merge of #146608 - lolbinarycat:bootstrap-readme, r=Kobzol improve internal bootstrap docs Mainly focused on making it easier to figure out how tools get built without having to read the `bootstrap_tool!` macro, but also added some subdirs of `build/` to the readme.
2 parents 9d82de1 + b8cb80c commit 8d4cf2d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/bootstrap/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ build/
6363
debug/
6464
release/
6565

66+
# Build directory for various tools like `typos` that are only ever
67+
# built for the host system, and always with stage0 cargo.
68+
misc-tools/
69+
bin/
70+
target/
71+
72+
# Directory where js dependencies like tsc and eslint are stored.
73+
node_modules/
74+
.bin/
75+
76+
# Copy of package.json and package-lock.json, because npm requires these
77+
# to be in the same directory as `node_modules`.
78+
package.json
79+
package-lock.json
80+
6681
# Output of the dist-related steps like dist-std, dist-rustc, and dist-docs
6782
dist/
6883

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,9 @@ macro_rules! bootstrap_tool {
394394
}
395395

396396
impl<'a> Builder<'a> {
397+
/// Ensure a tool is built, then get the path to its executable.
398+
///
399+
/// The actual building, if any, will be handled via [`ToolBuild`].
397400
pub fn tool_exe(&self, tool: Tool) -> PathBuf {
398401
match tool {
399402
$(Tool::$name =>
@@ -1552,6 +1555,8 @@ pub const TEST_FLOAT_PARSE_ALLOW_FEATURES: &str = "f16,cfg_target_has_reliable_f
15521555
impl Builder<'_> {
15531556
/// Gets a `BootstrapCommand` which is ready to run `tool` in `stage` built for
15541557
/// `host`.
1558+
///
1559+
/// This also ensures that the given tool is built (using [`ToolBuild`]).
15551560
pub fn tool_cmd(&self, tool: Tool) -> BootstrapCommand {
15561561
let mut cmd = command(self.tool_exe(tool));
15571562
let compiler = self.compiler(0, self.config.host_target);

0 commit comments

Comments
 (0)