Skip to content

Commit ffe8349

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

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,34 @@ 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+
let args = lint_args(builder, &self.config, &[]);
382383
run_cargo(
383384
builder,
384385
cargo,
385-
lint_args(builder, &self.config, &[]),
386+
args.clone(),
387+
&stamp,
388+
vec![],
389+
true,
390+
false,
391+
);
392+
393+
// Same but we disable the features enabled by default.
394+
let mut cargo = prepare_tool_cargo(
395+
builder,
396+
build_compiler,
397+
Mode::Codegen,
398+
target,
399+
Kind::Clippy,
400+
"compiler/rustc_codegen_gcc",
401+
SourceType::InTree,
402+
&[],
403+
);
404+
self.build_compiler.configure_cargo(&mut cargo);
405+
cargo.arg("--no-default-features");
406+
run_cargo(
407+
builder,
408+
cargo,
409+
args,
386410
&stamp,
387411
vec![],
388412
true,

0 commit comments

Comments
 (0)