about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-05-27 13:01:38 +0200
committerGitHub <noreply@github.com>2025-05-27 13:01:38 +0200
commit2c5361a309686e121d9c200c7ba5495346ff1a4d (patch)
treeda9411c2a3349b55861ac8b6a93dae21cb6709e0
parent7acdffb6e47d653b1c74ba0eb8ca53239c876da6 (diff)
parentb71a1279a1a0238c8d4875c569721465823645a8 (diff)
Rollup merge of #141568 - onur-ozkan:141393-fix, r=Kobzol
dist: make sure llvm-project submodule is present

Zero-config `x install` fails when bootstrap tries to copy files from the LLVM submodule because it's not properly initialized/handled. This diff handles that.

Fixes https://github.com/rust-lang/rust/issues/141393
-rw-r--r--src/bootstrap/src/core/build_steps/dist.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index 253fa224152..7b5393a115a 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -2282,6 +2282,10 @@ impl Step for LlvmTools {
             }
         }
 
+        if !builder.config.dry_run() {
+            builder.require_submodule("src/llvm-project", None);
+        }
+
         builder.ensure(crate::core::build_steps::llvm::Llvm { target });
 
         let mut tarball = Tarball::new(builder, "llvm-tools", &target.triple);
@@ -2400,6 +2404,10 @@ impl Step for RustDev {
             }
         }
 
+        if !builder.config.dry_run() {
+            builder.require_submodule("src/llvm-project", None);
+        }
+
         let mut tarball = Tarball::new(builder, "rust-dev", &target.triple);
         tarball.set_overlay(OverlayKind::Llvm);
         // LLVM requires a shared object symlink to exist on some platforms.