Skip to content

Commit

Permalink
Auto merge of #130135 - Kobzol:bootstrap-check-linker, r=onur-ozkan
Browse files Browse the repository at this point in the history
Do not skip linker configuration for `check` builds

This essentially reverts a part of #128871, to fix #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: #130108
  • Loading branch information
bors committed Sep 9, 2024
2 parents 1f44f0a + c33aa86 commit 38e3a57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/src/utils/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { .. } => {
Expand Down

0 comments on commit 38e3a57

Please sign in to comment.