Skip to content

Commit 9296d3b

Browse files
committed
Do not build tools if user do not want them
1 parent 8d67f57 commit 9296d3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: src/bootstrap/tool.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,15 @@ macro_rules! tool_extended {
607607

608608
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
609609
let builder = run.builder;
610-
run.path($path).default_condition(builder.config.extended)
610+
run.path($path).default_condition(
611+
builder.config.extended
612+
&& builder.config.tools.as_ref().map_or(true, |tools| {
613+
tools.iter().any(|tool| match tool.as_ref() {
614+
"clippy" => $tool_name == "clippy-driver",
615+
x => $tool_name == x,
616+
})
617+
}),
618+
)
611619
}
612620

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

0 commit comments

Comments
 (0)