Skip to content

Commit

Permalink
Rollup merge of rust-lang#71346 - mati865:rustbuild-tools, r=Mark-Sim…
Browse files Browse the repository at this point in the history
…ulacrum

Do not build tools if user do not want them

Fixes rust-lang#71307
  • Loading branch information
Dylan-DPC authored Apr 20, 2020
2 parents 42b533d + 9296d3b commit 9a0e702
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,15 @@ macro_rules! tool_extended {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path($path).default_condition(builder.config.extended)
run.path($path).default_condition(
builder.config.extended
&& builder.config.tools.as_ref().map_or(true, |tools| {
tools.iter().any(|tool| match tool.as_ref() {
"clippy" => $tool_name == "clippy-driver",
x => $tool_name == x,
})
}),
)
}

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

0 comments on commit 9a0e702

Please sign in to comment.