about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2024-09-09 09:45:59 +0200
committerJakub Beránek <berykubik@gmail.com>2024-09-09 10:07:22 +0200
commitc33aa863f8852ab0388aed6e578ba015eae702a6 (patch)
tree22256d1d96d25770c925a97b5e537818958be740 /src/bootstrap
parent085744b7ad8b227239bcee0a44cd78dcd0310ab9 (diff)
downloadrust-c33aa863f8852ab0388aed6e578ba015eae702a6.tar.gz
rust-c33aa863f8852ab0388aed6e578ba015eae702a6.zip
Do not skip linker configuration for `check` builds
It was causing unexpected rebuilds.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/builder.rs5
-rw-r--r--src/bootstrap/src/utils/cc_detect.rs1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs
index 8f7ade79403..1e8779817fb 100644
--- a/src/bootstrap/src/core/builder.rs
+++ b/src/bootstrap/src/core/builder.rs
@@ -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);
             }
diff --git a/src/bootstrap/src/utils/cc_detect.rs b/src/bootstrap/src/utils/cc_detect.rs
index a2c7ab31df8..c39415e7c18 100644
--- a/src/bootstrap/src/utils/cc_detect.rs
+++ b/src/bootstrap/src/utils/cc_detect.rs
@@ -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 { .. } => {