bootstrap: build cargo only if requested in tools
This commit is contained in:
parent
75da570d78
commit
15aad5fcdb
1 changed files with 8 additions and 1 deletions
|
@ -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<'_>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue