Skip to content

Commit

Permalink
fix the second task for issue#110087
Browse files Browse the repository at this point in the history
Make sure the llvm binary path exists.
  • Loading branch information
LuuuXXX committed Oct 24, 2023
1 parent c39871d commit 28ca7bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/download-ci-llvm-stamp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Change this file to make users of the `download-ci-llvm` configuration download
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.

Last change is for: https://github.com/rust-lang/rust/pull/113996
Last change is for: https://github.com/rust-lang/rust/pull/116881
24 changes: 9 additions & 15 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2125,23 +2125,17 @@ impl Step for RustDev {
builder.ensure(crate::core::build_steps::llvm::Lld { target });

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

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

0 comments on commit 28ca7bb

Please sign in to comment.