aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-12-23 21:19:48 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-12-23 21:19:48 -0500
commitc8302a5a0e01268b4655983fcfe5267b86f98036 (patch)
tree920a51bc699e07110f3f6fe6a33970cb899b220a
parent3cbc244e982da2189acfe1de9d60b478d2e60de4 (diff)
downloadzig-c8302a5a0e01268b4655983fcfe5267b86f98036.tar.gz
zig-c8302a5a0e01268b4655983fcfe5267b86f98036.zip
build: findLLVM correctly handles system libraries
-rw-r--r--build.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 285c124f8f..dbb54f8c3e 100644
--- a/build.zig
+++ b/build.zig
@@ -128,7 +128,11 @@ fn findLLVM(b: &Builder) -> ?LibraryDep {
if (mem.startsWith(u8, lib_arg, "-l")) {
%%result.system_libs.append(lib_arg[2..]);
} else {
- %%result.libs.append(lib_arg);
+ if (os.path.isAbsolute(lib_arg)) {
+ %%result.libs.append(lib_arg);
+ } else {
+ %%result.system_libs.append(lib_arg);
+ }
}
}
}