From 4b9df12d34b775f85fbf0041940ff8abe4ffdeb2 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 20 Feb 2025 22:48:39 +0300 Subject: [PATCH] skip submodule updating logics on tarballs Signed-off-by: onur-ozkan (cherry picked from commit d2203ad59c67a6acb2968ea77e1e9dea5530e518) --- src/bootstrap/src/core/config/config.rs | 2 +- src/bootstrap/src/lib.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 62625fc3660f..65f286a05bd5 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 e4a6e2b55e73..21b02a3b541a 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() {