summary refs log tree commit diff
diff options
context:
space:
mode:
authoronur-ozkan <work@onurozkan.dev>2025-02-20 22:48:39 +0300
committerJosh Stone <jistone@redhat.com>2025-02-27 10:48:31 -0800
commit4b9df12d34b775f85fbf0041940ff8abe4ffdeb2 (patch)
treee9b23225f2f424e613fd591ee5ec9bba2d20a57c
parentf32d360dc77390cfd635fe7c5ab8fecb8e180bc4 (diff)
downloadrust-4b9df12d34b775f85fbf0041940ff8abe4ffdeb2.tar.gz
rust-4b9df12d34b775f85fbf0041940ff8abe4ffdeb2.zip
skip submodule updating logics on tarballs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit d2203ad59c67a6acb2968ea77e1e9dea5530e518)
-rw-r--r--src/bootstrap/src/core/config/config.rs2
-rw-r--r--src/bootstrap/src/lib.rs4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 62625fc3660..65f286a05bd 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -2748,7 +2748,7 @@ impl Config {
     /// used instead to provide a nice error to the user if the submodule is
     /// missing.
     pub(crate) fn update_submodule(&self, relative_path: &str) {
-        if !self.submodules() {
+        if self.rust_info.is_from_tarball() || !self.submodules() {
             return;
         }
 
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index e4a6e2b55e7..21b02a3b541 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -472,6 +472,10 @@ impl Build {
     /// The given `err_hint` will be shown to the user if the submodule is not
     /// checked out and submodule management is disabled.
     pub fn require_submodule(&self, submodule: &str, err_hint: Option<&str>) {
+        if self.rust_info().is_from_tarball() {
+            return;
+        }
+
         // When testing bootstrap itself, it is much faster to ignore
         // submodules. Almost all Steps work fine without their submodules.
         if cfg!(test) && !self.config.submodules() {