Skip to content

Commit 8866db4

Browse files
committed
Auto merge of rust-lang#121395 - nikic:update-llvm-21, r=<try>
Update to LLVM 18.1.0 rc 3 Fixes rust-lang#120819. Fixes rust-lang#121180. Fixes rust-lang#121239. Fixes rust-lang#121367.
2 parents 1bb3a9f + 862f33e commit 8866db4

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,16 @@ fn install_llvm_file(builder: &Builder<'_>, source: &Path, destination: &Path) {
20262026
return;
20272027
}
20282028

2029-
builder.install(source, destination, 0o644);
2029+
if source.is_symlink() {
2030+
// If we have a symlink like libLLVM-18.so -> libLLVM.so.18.1, install both the target
2031+
// and the symlink. The target is what will get loaded at runtime. The symlink is what
2032+
// will be used for linking when download-ci-llvm is used.
2033+
builder.install(&t!(fs::canonicalize(source)), destination, 0o644);
2034+
let full_dest = destination.join(source.file_name().unwrap());
2035+
builder.copy(&source, &full_dest);
2036+
} else {
2037+
builder.install(&source, destination, 0o644);
2038+
}
20302039
}
20312040

20322041
/// Maybe add LLVM object files to the given destination lib-dir. Allows either static or dynamic linking.

src/bootstrap/src/core/build_steps/llvm.rs

-3
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ pub fn prebuilt_llvm_config(
9898
let out_dir = builder.llvm_out(target);
9999

100100
let mut llvm_config_ret_dir = builder.llvm_out(builder.config.build);
101-
if (!builder.config.build.is_msvc() || builder.ninja()) && !builder.config.llvm_from_ci {
102-
llvm_config_ret_dir.push("build");
103-
}
104101
llvm_config_ret_dir.push("bin");
105102
let build_llvm_config = llvm_config_ret_dir.join(exe("llvm-config", builder.config.build));
106103
let llvm_cmake_dir = out_dir.join("lib/cmake/llvm");

src/llvm-project

Submodule llvm-project updated 165 files

src/tools/opt-dist/src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ fn execute_pipeline(
270270
})?;
271271

272272
let libdir = env.build_artifacts().join("stage2").join("lib");
273-
let llvm_lib = io::find_file_in_dir(&libdir, "libLLVM", ".so")?;
273+
// The actual name will be something like libLLVM.so.18.1-rust-dev.
274+
let llvm_lib = io::find_file_in_dir(&libdir, "libLLVM.so", "")?;
274275

275276
log::info!("Optimizing {llvm_lib} with BOLT");
276277

0 commit comments

Comments
 (0)