Skip to content

Commit c33aa86

Browse files
committed
Do not skip linker configuration for check builds
It was causing unexpected rebuilds.
1 parent 085744b commit c33aa86

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bootstrap/src/core/builder.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2465,8 +2465,9 @@ impl Cargo {
24652465
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
24662466

24672467
match cmd_kind {
2468-
// No need to configure the target linker for these command types.
2469-
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {}
2468+
// No need to configure the target linker for these command types,
2469+
// as they don't invoke rustc at all.
2470+
Kind::Clean | Kind::Suggest | Kind::Format | Kind::Setup => {}
24702471
_ => {
24712472
cargo.configure_linker(builder);
24722473
}

src/bootstrap/src/utils/cc_detect.rs

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pub fn find(build: &Build) {
9090
let targets: HashSet<_> = match build.config.cmd {
9191
// We don't need to check cross targets for these commands.
9292
crate::Subcommand::Clean { .. }
93-
| crate::Subcommand::Check { .. }
9493
| crate::Subcommand::Suggest { .. }
9594
| crate::Subcommand::Format { .. }
9695
| crate::Subcommand::Setup { .. } => {

0 commit comments

Comments
 (0)