mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
update build to look for llvm 5.0
This commit is contained in:
parent
8f57544410
commit
234030c37a
@ -76,7 +76,7 @@ the Zig compiler itself:
|
|||||||
These libraries must be installed on your system, with the development files
|
These libraries must be installed on your system, with the development files
|
||||||
available. The Zig compiler links against them.
|
available. The Zig compiler links against them.
|
||||||
|
|
||||||
* LLVM, Clang, and LLD libraries == 4.x
|
* LLVM, Clang, and LLD libraries == 5.x
|
||||||
|
|
||||||
### Debug / Development Build
|
### Debug / Development Build
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,14 @@
|
|||||||
|
|
||||||
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
|
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib/llvm-4.0/include
|
/usr/lib/llvm-5.0/include
|
||||||
/mingw64/include)
|
/mingw64/include)
|
||||||
|
|
||||||
macro(FIND_AND_ADD_CLANG_LIB _libname_)
|
macro(FIND_AND_ADD_CLANG_LIB _libname_)
|
||||||
string(TOUPPER ${_libname_} _prettylibname_)
|
string(TOUPPER ${_libname_} _prettylibname_)
|
||||||
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
|
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib/llvm-4.0/lib
|
/usr/lib/llvm-5.0/lib
|
||||||
/mingw64/lib
|
/mingw64/lib
|
||||||
/c/msys64/mingw64/lib
|
/c/msys64/mingw64/lib
|
||||||
c:\\msys64\\mingw64\\lib)
|
c:\\msys64\\mingw64\\lib)
|
||||||
|
|||||||
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
find_path(LLD_INCLUDE_DIRS NAMES lld/Driver/Driver.h
|
find_path(LLD_INCLUDE_DIRS NAMES lld/Driver/Driver.h
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib/llvm-4.0/include
|
/usr/lib/llvm-5.0/include
|
||||||
/mingw64/include)
|
/mingw64/include)
|
||||||
|
|
||||||
find_library(LLD_LIBRARY NAMES lld-4.0 lld PATHS /usr/lib/llvm-4.0/lib)
|
find_library(LLD_LIBRARY NAMES lld-5.0 lld PATHS /usr/lib/llvm-5.0/lib)
|
||||||
if(EXISTS ${LLD_LIBRARY})
|
if(EXISTS ${LLD_LIBRARY})
|
||||||
set(LLD_LIBRARIES ${LLD_LIBRARY})
|
set(LLD_LIBRARIES ${LLD_LIBRARY})
|
||||||
else()
|
else()
|
||||||
@ -19,7 +19,7 @@ else()
|
|||||||
string(TOUPPER ${_libname_} _prettylibname_)
|
string(TOUPPER ${_libname_} _prettylibname_)
|
||||||
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
|
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||||
PATHS
|
PATHS
|
||||||
/usr/lib/llvm-4.0/lib
|
/usr/lib/llvm-5.0/lib
|
||||||
/mingw64/lib
|
/mingw64/lib
|
||||||
/c/msys64/mingw64/lib
|
/c/msys64/mingw64/lib
|
||||||
c:/msys64/mingw64/lib)
|
c:/msys64/mingw64/lib)
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
# LLVM_LIBDIRS
|
# LLVM_LIBDIRS
|
||||||
|
|
||||||
find_program(LLVM_CONFIG_EXE
|
find_program(LLVM_CONFIG_EXE
|
||||||
NAMES llvm-config llvm-config-4.0
|
NAMES llvm-config llvm-config-5.0
|
||||||
PATHS
|
PATHS
|
||||||
"/mingw64/bin"
|
"/mingw64/bin"
|
||||||
"/c/msys64/mingw64/bin"
|
"/c/msys64/mingw64/bin"
|
||||||
"c:/msys64/mingw64/bin"
|
"c:/msys64/mingw64/bin"
|
||||||
"C:/Libraries/llvm-4.0.0/bin")
|
"C:/Libraries/llvm-5.0.0/bin")
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${LLVM_CONFIG_EXE} --libs
|
COMMAND ${LLVM_CONFIG_EXE} --libs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user