Skip to content

Commit f38555c

Browse files
committed
Fix download-ci-llvm NixOS patching for .sos.
1 parent c318799 commit f38555c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/native.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub(crate) fn maybe_download_ci_llvm(builder: &Builder<'_>) {
156156
let llvm_lib = llvm_root.join("lib");
157157
for entry in t!(fs::read_dir(&llvm_lib)) {
158158
let lib = t!(entry).path();
159-
if lib.ends_with(".so") {
159+
if lib.extension().map_or(false, |ext| ext == "so") {
160160
fix_bin_or_dylib(builder, &lib);
161161
}
162162
}
@@ -284,7 +284,7 @@ fn fix_bin_or_dylib(builder: &Builder<'_>, fname: &Path) {
284284
entries
285285
};
286286
patchelf.args(&[OsString::from("--set-rpath"), rpath_entries]);
287-
if !fname.ends_with(".so") {
287+
if !fname.extension().map_or(false, |ext| ext == "so") {
288288
// Finally, set the corret .interp for binaries
289289
let dynamic_linker_path = nix_deps_dir.join("nix-support/dynamic-linker");
290290
// FIXME: can we support utf8 here? `args` doesn't accept Vec<u8>, only OsString ...

0 commit comments

Comments
 (0)