Browse Source

Fix linked libs for linux

Link `pthread` and `z` on linux as well. Link `tinfo` if `/usr/lib/libtinfo.so` file exists. This is required because despite explicitly disabling these libs in LLVM build config they still somehow get pulled in on some systems. `pthread` and `z` are standard components of every linux distribution therefore linking them unconditionally is OK. `tinfo` may not exist on some systems therefore it's existence is checked first. With this patch finally builds produced on Archlinux no longer result in `DllNotFoundException`.
pull/1018/head
Rokas Kupstys 8 years ago
parent
commit
8bc1c56f9c
  1. 11
      build/LLVM.lua

11
build/LLVM.lua

@ -94,13 +94,20 @@ function SetupLLVMLibs() @@ -94,13 +94,20 @@ function SetupLLVMLibs()
defines { "__STDC_CONSTANT_MACROS", "__STDC_LIMIT_MACROS" }
filter { "system:macosx" }
links { "c++", "curses", "pthread", "z" }
links { "c++", "curses" }
filter { "system:macosx or system:linux" }
links { "pthread", "z" }
filter { "action:vs*" }
links { "version" }
filter {}
if os.ishost("linux") and os.isfile("/usr/lib/libtinfo.so") then
links { "tinfo" }
end
if LLVMDirPerConfiguration then
filter { "configurations:Debug" }
libdirs { path.join(LLVMRootDirDebug, "build/lib") }

Loading…
Cancel
Save