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
This commit is contained in:
Michael Goulet 2025-05-27 13:01:38 +02:00 committed by GitHub
commit 2c5361a309
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.