Skip to content

Commit 4c6544b

Browse files
Run clippy both with and without default features on the GCC backend
1 parent 5bc3450 commit 4c6544b

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/bootstrap/src/core/build_steps/clippy.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,23 @@ impl Step for CodegenGcc {
379379
let stamp = BuildStamp::new(&builder.cargo_out(build_compiler, Mode::Codegen, target))
380380
.with_prefix("rustc_codegen_gcc-check");
381381

382-
run_cargo(
382+
let args = lint_args(builder, &self.config, &[]);
383+
run_cargo(builder, cargo, args.clone(), &stamp, vec![], true, false);
384+
385+
// Same but we disable the features enabled by default.
386+
let mut cargo = prepare_tool_cargo(
383387
builder,
384-
cargo,
385-
lint_args(builder, &self.config, &[]),
386-
&stamp,
387-
vec![],
388-
true,
389-
false,
388+
build_compiler,
389+
Mode::Codegen,
390+
target,
391+
Kind::Clippy,
392+
"compiler/rustc_codegen_gcc",
393+
SourceType::InTree,
394+
&[],
390395
);
396+
self.build_compiler.configure_cargo(&mut cargo);
397+
cargo.arg("--no-default-features");
398+
run_cargo(builder, cargo, args, &stamp, vec![], true, false);
391399
}
392400

393401
fn metadata(&self) -> Option<StepMetadata> {

0 commit comments

Comments
 (0)