diff options
| author | bors <bors@rust-lang.org> | 2021-09-05 10:11:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-05 10:11:37 +0000 |
| commit | 7e1e3eb5e19c7d1a4eabe4da22bf2aa085772766 (patch) | |
| tree | 17f18508f3871b25d4aef2b72b6a611f4065b2ce /src/bootstrap | |
| parent | 6b9a227b12ea7a6c007500d834fcb5e3969b3fdc (diff) | |
| parent | b4d06bfa8f7c3a836fb124307bdd3ec5007fac73 (diff) | |
Auto merge of #88662 - m-ou-se:rollup-h6lgp7k, r=m-ou-se
Rollup of 4 pull requests Successful merges: - #88257 (Provide more context on incorrect inner attribute) - #88432 (Fix a typo in raw_vec) - #88511 (x.py clippy: don't run with --all-targets by default) - #88657 (Fix 2021 `dyn` suggestion that used code as label) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/check.rs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 4eb335979b9..f5fad4b4136 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -107,6 +107,11 @@ impl Step for Std { add_to_sysroot(&builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target)); } + // don't run on std twice with x.py clippy + if builder.kind == Kind::Clippy { + return; + } + // Then run cargo again, once we've put the rmeta files for the library // crates into the sysroot. This is needed because e.g., core's tests // depend on `libtest` -- Cargo presumes it will exist, but it doesn't @@ -120,6 +125,7 @@ impl Step for Std { target, cargo_subcommand(builder.kind), ); + cargo.arg("--all-targets"); std_cargo(builder, target, compiler.stage, &mut cargo); @@ -192,7 +198,12 @@ impl Step for Rustc { cargo_subcommand(builder.kind), ); rustc_cargo(builder, &mut cargo, target); - cargo.arg("--all-targets"); + + // For ./x.py clippy, don't run with --all-targets because + // linting tests and benchmarks can produce very noisy results + if builder.kind != Kind::Clippy { + cargo.arg("--all-targets"); + } // Explicitly pass -p for all compiler krates -- this will force cargo // to also check the tests/benches/examples for these crates, rather @@ -313,7 +324,12 @@ macro_rules! tool_check_step { $source_type, &[], ); - cargo.arg("--all-targets"); + + // For ./x.py clippy, don't run with --all-targets because + // linting tests and benchmarks can produce very noisy results + if builder.kind != Kind::Clippy { + cargo.arg("--all-targets"); + } // Enable internal lints for clippy and rustdoc // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]` |
