authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 09:17:37-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-03 09:17:37-05:00
log3418a332ab3a120f21354d98579d7a3a2dcb523b
tree2ad84786e1a993fe8087bf3755d730533d919aeb
parente4180de2e9a0b94eed793e43d471e0b563ac43d3
signaturelock-open Commit is signed but in an unrecognized format.

Revert "work around LLVM 10 llvm-config giving absolute path to libz.so"

This reverts commit 73256dda91d0d5b3d13016d15f2c4465a69cd7d4. No longer needed with latest release/10.x branch.

1 files changed, 7 insertions(+), 12 deletions(-)

build.zig+7-12
...@@ -227,20 +227,15 @@ fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep {...@@ -227,20 +227,15 @@ fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep {
227 while (it.next()) |lib_arg| {227 while (it.next()) |lib_arg| {
228 if (mem.startsWith(u8, lib_arg, "-l")) {228 if (mem.startsWith(u8, lib_arg, "-l")) {
229 try result.system_libs.append(lib_arg[2..]);229 try result.system_libs.append(lib_arg[2..]);
230 } else if (fs.path.isAbsolute(lib_arg)) {
231 if (mem.endsWith(u8, lib_arg, "libz.so")) {
232 // llvm-config version 10 started giving an absolute path to zlib as
233 // a shared object, which fails to deal with rpaths correctly. Here
234 // we change it to a normal -lz
235 try result.system_libs.append("z");
236 } else {
237 try result.libs.append(lib_arg);
238 }
239 } else {230 } else {
240 if (mem.endsWith(u8, lib_arg, ".lib")) {231 if (fs.path.isAbsolute(lib_arg)) {
241 lib_arg = lib_arg[0 .. lib_arg.len - 4];232 try result.libs.append(lib_arg);
233 } else {
234 if (mem.endsWith(u8, lib_arg, ".lib")) {
235 lib_arg = lib_arg[0 .. lib_arg.len - 4];
236 }
237 try result.system_libs.append(lib_arg);
242 }238 }
243 try result.system_libs.append(lib_arg);
244 }239 }
245 }240 }
246 }241 }