Skip to content

Commit 679b6ce

Browse files
authored
Rollup merge of rust-lang#140357 - onur-ozkan:133840, r=clubby789
bypass linker configuration and cross target check on `x check` I was going to handle this using the untracked env approach, but I realized it somehow doesn't regress rust-lang#130108 anymore... Anyway, if it works, it works. 😄 No need to dig deeper but my guess is we moved some cache-invalidating env from these functions to others. Fixes rust-lang#133840
2 parents 622ac04 + 7669d50 commit 679b6ce

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,8 @@ impl Cargo {
112112
let mut cargo = builder.cargo(compiler, mode, source_type, target, cmd_kind);
113113

114114
match cmd_kind {
115-
// No need to configure the target linker for these command types,
116-
// as they don't invoke rustc at all.
117-
Kind::Clean | Kind::Suggest | Kind::Format | Kind::Setup => {}
115+
// No need to configure the target linker for these command types.
116+
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {}
118117
_ => {
119118
cargo.configure_linker(builder);
120119
}
@@ -205,6 +204,8 @@ impl Cargo {
205204
self
206205
}
207206

207+
// FIXME(onur-ozkan): Add coverage to make sure modifications to this function
208+
// doesn't cause cache invalidations (e.g., #130108).
208209
fn configure_linker(&mut self, builder: &Builder<'_>) -> &mut Cargo {
209210
let target = self.target;
210211
let compiler = self.compiler;

src/bootstrap/src/utils/cc_detect.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ pub fn find(build: &Build) {
9696
let targets: HashSet<_> = match build.config.cmd {
9797
// We don't need to check cross targets for these commands.
9898
crate::Subcommand::Clean { .. }
99+
| crate::Subcommand::Check { .. }
99100
| crate::Subcommand::Suggest { .. }
100101
| crate::Subcommand::Format { .. }
101102
| crate::Subcommand::Setup { .. } => {

0 commit comments

Comments
 (0)