Rollup merge of #85297 - infinity0:master, r=Mark-Simulacrum
bootstrap: build cargo only if requested in tools In Debian we'd like to build rustfmt and clippy alongside rustc, but we're still excluding cargo from the rustc build and doing that separately. This patch makes that possible.
This commit is contained in:
commit
f66b6c2e6c
@ -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…
x
Reference in New Issue
Block a user