about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMateusz Mikuła <mati865@gmail.com>2020-04-20 12:39:12 +0200
committerMateusz Mikuła <mati865@gmail.com>2020-04-20 20:30:13 +0200
commit9296d3ba8247ac292226ba19fefc6d577f2d5dfd (patch)
treeedf3c6ae9946aa5bfc6840403e9a51c92ac3eb35 /src
parent8d67f576b56e8fc98a31123e5963f8d00e40611c (diff)
downloadrust-9296d3ba8247ac292226ba19fefc6d577f2d5dfd.tar.gz
rust-9296d3ba8247ac292226ba19fefc6d577f2d5dfd.zip
Do not build tools if user do not want them
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/tool.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 52f750f448e..f756b1235ab 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -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<'_>) {