Skip to content

Commit

Permalink
bootstrap: build cargo only if requested in tools
Browse files Browse the repository at this point in the history
  • Loading branch information
infinity0 committed May 14, 2021
1 parent 75da570 commit 15aad5f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bootstrap/tool.rs
Expand Up @@ -593,7 +593,14 @@ impl Step for Cargo {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path("src/tools/cargo").default_condition(builder.config.extended)
run.path("src/tools/cargo").default_condition(
builder.config.extended
&& builder.config.tools.as_ref().map_or(
true,
// If `tools` is set, search list for this tool.
|tools| tools.iter().any(|tool| tool == "cargo"),
),
)
}

fn make_run(run: RunConfig<'_>) {
Expand Down

0 comments on commit 15aad5f

Please sign in to comment.