Skip to content

Commit 15aad5f

Browse files
committed
bootstrap: build cargo only if requested in tools
1 parent 75da570 commit 15aad5f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/bootstrap/tool.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,14 @@ impl Step for Cargo {
593593

594594
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
595595
let builder = run.builder;
596-
run.path("src/tools/cargo").default_condition(builder.config.extended)
596+
run.path("src/tools/cargo").default_condition(
597+
builder.config.extended
598+
&& builder.config.tools.as_ref().map_or(
599+
true,
600+
// If `tools` is set, search list for this tool.
601+
|tools| tools.iter().any(|tool| tool == "cargo"),
602+
),
603+
)
597604
}
598605

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

0 commit comments

Comments
 (0)