Do not skip linker configuration for check builds

It was causing unexpected rebuilds.
This commit is contained in:
Jakub Beránek 2024-09-09 09:45:59 +02:00
parent 085744b7ad
commit c33aa863f8
No known key found for this signature in database
GPG Key ID: 909CD0D26483516B
2 changed files with 3 additions and 3 deletions

View File

@ -2465,8 +2465,9 @@ impl Cargo {
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
match cmd_kind {
// No need to configure the target linker for these command types.
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {}
// No need to configure the target linker for these command types,
// as they don't invoke rustc at all.
Kind::Clean | Kind::Suggest | Kind::Format | Kind::Setup => {}
_ => {
cargo.configure_linker(builder);
}

View File

@ -90,7 +90,6 @@ pub fn find(build: &Build) {
let targets: HashSet<_> = match build.config.cmd {
// We don't need to check cross targets for these commands.
crate::Subcommand::Clean { .. }
| crate::Subcommand::Check { .. }
| crate::Subcommand::Suggest { .. }
| crate::Subcommand::Format { .. }
| crate::Subcommand::Setup { .. } => {