Skip to content

Commit 28ca7bb

Browse files
committed
fix the second task for issue#110087
Make sure the llvm binary path exists.
1 parent c39871d commit 28ca7bb

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/bootstrap/download-ci-llvm-stamp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Change this file to make users of the `download-ci-llvm` configuration download
22
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.
33

4-
Last change is for: https://github.com/rust-lang/rust/pull/113996
4+
Last change is for: https://github.com/rust-lang/rust/pull/116881

src/bootstrap/src/core/build_steps/dist.rs

+9-15
Original file line numberDiff line numberDiff line change
@@ -2125,23 +2125,17 @@ impl Step for RustDev {
21252125
builder.ensure(crate::core::build_steps::llvm::Lld { target });
21262126

21272127
let src_bindir = builder.llvm_out(target).join("bin");
2128-
// If updating this list, you likely want to change
2128+
// If updating this, you likely want to change
21292129
// src/bootstrap/download-ci-llvm-stamp as well, otherwise local users
21302130
// will not pick up the extra file until LLVM gets bumped.
2131-
for bin in &[
2132-
"llvm-config",
2133-
"llvm-ar",
2134-
"llvm-objdump",
2135-
"llvm-profdata",
2136-
"llvm-bcanalyzer",
2137-
"llvm-cov",
2138-
"llvm-dwp",
2139-
"llvm-nm",
2140-
"llvm-dwarfdump",
2141-
"llvm-dis",
2142-
"llvm-tblgen",
2143-
] {
2144-
tarball.add_file(src_bindir.join(exe(bin, target)), "bin", 0o755);
2131+
if src_bindir.exists() {
2132+
for entry in walkdir::WalkDir::new(&src_bindir) {
2133+
let entry = t!(entry);
2134+
if entry.file_type().is_file() && !entry.path_is_symlink() {
2135+
let name = entry.file_name().to_str().unwrap();
2136+
tarball.add_file(src_bindir.join(name), "bin", 0o755);
2137+
}
2138+
}
21452139
}
21462140

21472141
// We don't build LLD on some platforms, so only add it if it exists

0 commit comments

Comments
 (0)