Browse Source

Merge pull request #1018 from rokups/fix-unpackaged-llvm-includes

Use correct LLVM build dir for includes from unpackaged LLVM builds
pull/1014/head
João Matos 8 years ago committed by GitHub
parent
commit
f8f11d2042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      build/LLVM.lua

19
build/LLVM.lua

@ -25,7 +25,13 @@ function SearchLLVM() @@ -25,7 +25,13 @@ function SearchLLVM()
end
function get_llvm_build_dir()
return path.join(LLVMRootDir, "build")
local packageDir = path.join(LLVMRootDir, get_llvm_package_name())
local buildDir = path.join(LLVMRootDir, "build")
if os.isdir(buildDir) then
return buildDir
else
return packageDir
end
end
function SetupLLVMIncludes()
@ -94,13 +100,20 @@ function SetupLLVMLibs() @@ -94,13 +100,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