Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ build/
debug/
release/

# Build directory for various tools like `typos` that are only ever
# built for the host system, and always with stage0 cargo.
misc-tools/
bin/
target/

# Directory where js dependencies like tsc and eslint are stored.
node_modules/
.bin/

# Copy of package.json and package-lock.json, because npm requires these
# to be in the same directory as `node_modules`.
package.json
package-lock.json

# Output of the dist-related steps like dist-std, dist-rustc, and dist-docs
dist/

Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ macro_rules! bootstrap_tool {
}

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