Auto merge of #130135 - Kobzol:bootstrap-check-linker, r=onur-ozkan

Do not skip linker configuration for `check` builds

This essentially reverts a part of https://github.com/rust-lang/rust/pull/128871, to fix https://github.com/rust-lang/rust/issues/130108. This is mostly a hotfix until we can figure out a better way to both avoid rebuilds and avoid configuring the linker for `x check`.

Skipping linker for check builds was causing unexpected rebuilds.

Fixes: https://github.com/rust-lang/rust/issues/130108
This commit is contained in:
bors 2024-09-09 11:49:07 +00:00
commit 38e3a5771c
2 changed files with 3 additions and 3 deletions

View File

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

View File

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