authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-02-03 13:38:48-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-02-03 13:38:48-07:00
log308f72701af0a44bdb2cb2893f3175b7d37f657b
tree0f05f64892186d93d8cc089cd3950aacb3e55523
parent3832b582292d3065f600e7c7a8393c411e6cdb0a

update cmake files to LLVM 14


3 files changed, 80 insertions(+), 80 deletions(-)

cmake/Findclang.cmake+23-23
......@@ -9,31 +9,31 @@
99
1010find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
1111 PATHS
12 /usr/lib/llvm/13/include
13 /usr/lib/llvm-13/include
14 /usr/lib/llvm-13.0/include
15 /usr/local/llvm130/include
16 /usr/local/llvm13/include
17 /usr/local/opt/llvm@13/include
18 /opt/homebrew/opt/llvm@13/include
12 /usr/lib/llvm/14/include
13 /usr/lib/llvm-14/include
14 /usr/lib/llvm-14.0/include
15 /usr/local/llvm140/include
16 /usr/local/llvm14/include
17 /usr/local/opt/llvm@14/include
18 /opt/homebrew/opt/llvm@14/include
1919 /mingw64/include
2020)
2121
2222if(ZIG_PREFER_CLANG_CPP_DYLIB)
2323 find_library(CLANG_LIBRARIES
2424 NAMES
25 clang-cpp-13.0
26 clang-cpp130
25 clang-cpp-14.0
26 clang-cpp140
2727 clang-cpp
2828 PATHS
2929 ${CLANG_LIBDIRS}
30 /usr/lib/llvm/13/lib
31 /usr/lib/llvm/13/lib64
32 /usr/lib/llvm-13/lib
33 /usr/local/llvm130/lib
34 /usr/local/llvm13/lib
35 /usr/local/opt/llvm@13/lib
36 /opt/homebrew/opt/llvm@13/lib
30 /usr/lib/llvm/14/lib
31 /usr/lib/llvm/14/lib64
32 /usr/lib/llvm-14/lib
33 /usr/local/llvm140/lib
34 /usr/local/llvm14/lib
35 /usr/local/opt/llvm@14/lib
36 /opt/homebrew/opt/llvm@14/lib
3737 )
3838endif()
3939
......@@ -43,13 +43,13 @@ if(NOT CLANG_LIBRARIES)
4343 find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
4444 PATHS
4545 ${CLANG_LIBDIRS}
46 /usr/lib/llvm/13/lib
47 /usr/lib/llvm-13/lib
48 /usr/lib/llvm-13.0/lib
49 /usr/local/llvm130/lib
50 /usr/local/llvm13/lib
51 /usr/local/opt/llvm@13/lib
52 /opt/homebrew/opt/llvm@13/lib
46 /usr/lib/llvm/14/lib
47 /usr/lib/llvm-14/lib
48 /usr/lib/llvm-14.0/lib
49 /usr/local/llvm140/lib
50 /usr/local/llvm14/lib
51 /usr/local/opt/llvm@14/lib
52 /opt/homebrew/opt/llvm@14/lib
5353 /mingw64/lib
5454 /c/msys64/mingw64/lib
5555 c:\\msys64\\mingw64\\lib
cmake/Findlld.cmake+16-16
......@@ -8,20 +8,20 @@
88
99find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
1010 PATHS
11 /usr/lib/llvm-13/include
12 /usr/local/llvm130/include
13 /usr/local/llvm13/include
14 /usr/local/opt/llvm@13/include
15 /opt/homebrew/opt/llvm@13/include
11 /usr/lib/llvm-14/include
12 /usr/local/llvm140/include
13 /usr/local/llvm14/include
14 /usr/local/opt/llvm@14/include
15 /opt/homebrew/opt/llvm@14/include
1616 /mingw64/include)
1717
18find_library(LLD_LIBRARY NAMES lld-13.0 lld130 lld
18find_library(LLD_LIBRARY NAMES lld-14.0 lld140 lld
1919 PATHS
20 /usr/lib/llvm-13/lib
21 /usr/local/llvm130/lib
22 /usr/local/llvm13/lib
23 /usr/local/opt/llvm@13/lib
24 /opt/homebrew/opt/llvm@13/lib
20 /usr/lib/llvm-14/lib
21 /usr/local/llvm140/lib
22 /usr/local/llvm14/lib
23 /usr/local/opt/llvm@14/lib
24 /opt/homebrew/opt/llvm@14/lib
2525)
2626if(EXISTS ${LLD_LIBRARY})
2727 set(LLD_LIBRARIES ${LLD_LIBRARY})
......@@ -31,11 +31,11 @@ else()
3131 find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
3232 PATHS
3333 ${LLD_LIBDIRS}
34 /usr/lib/llvm-13/lib
35 /usr/local/llvm130/lib
36 /usr/local/llvm13/lib
37 /usr/local/opt/llvm@13/lib
38 /opt/homebrew/opt/llvm@13/lib
34 /usr/lib/llvm-14/lib
35 /usr/local/llvm140/lib
36 /usr/local/llvm14/lib
37 /usr/local/opt/llvm@14/lib
38 /opt/homebrew/opt/llvm@14/lib
3939 /mingw64/lib
4040 /c/msys64/mingw64/lib
4141 c:/msys64/mingw64/lib)
cmake/Findllvm.cmake+41-41
......@@ -9,41 +9,41 @@
99
1010find_path(LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h
1111 PATHS
12 /usr/lib/llvm/13/include
13 /usr/lib/llvm-13/include
14 /usr/lib/llvm-13.0/include
15 /usr/local/llvm13/include
16 /usr/local/llvm130/include
17 /usr/local/opt/llvm@13/include
18 /opt/homebrew/opt/llvm@13/include
12 /usr/lib/llvm/14/include
13 /usr/lib/llvm-14/include
14 /usr/lib/llvm-14.0/include
15 /usr/local/llvm14/include
16 /usr/local/llvm140/include
17 /usr/local/opt/llvm@14/include
18 /opt/homebrew/opt/llvm@14/include
1919 /mingw64/include
2020)
2121
2222if(ZIG_PREFER_CLANG_CPP_DYLIB)
2323 find_library(LLVM_LIBRARIES
2424 NAMES
25 LLVM-13.0
26 LLVM-13
27 LLVM-130
25 LLVM-14.0
26 LLVM-14
27 LLVM-140
2828 LLVM
2929 PATHS
3030 ${LLVM_LIBDIRS}
31 /usr/lib/llvm/13/lib
32 /usr/lib/llvm/13/lib64
33 /usr/lib/llvm-13/lib
34 /usr/local/llvm13/lib
35 /usr/local/llvm130/lib
36 /usr/local/opt/llvm@13/lib
37 /opt/homebrew/opt/llvm@13/lib
31 /usr/lib/llvm/14/lib
32 /usr/lib/llvm/14/lib64
33 /usr/lib/llvm-14/lib
34 /usr/local/llvm14/lib
35 /usr/local/llvm140/lib
36 /usr/local/opt/llvm@14/lib
37 /opt/homebrew/opt/llvm@14/lib
3838 )
3939
4040 find_program(LLVM_CONFIG_EXE
41 NAMES llvm-config-13 llvm-config-13.0 llvm-config130 llvm-config13 llvm-config
41 NAMES llvm-config-14 llvm-config-14.0 llvm-config140 llvm-config14 llvm-config
4242 PATHS
4343 "/mingw64/bin"
4444 "/c/msys64/mingw64/bin"
4545 "c:/msys64/mingw64/bin"
46 "C:/Libraries/llvm-13.0.0/bin")
46 "C:/Libraries/llvm-14.0.0/bin")
4747
4848 if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
4949 message(FATAL_ERROR "unable to find llvm-config")
......@@ -58,23 +58,23 @@ if(ZIG_PREFER_CLANG_CPP_DYLIB)
5858 OUTPUT_VARIABLE LLVM_CONFIG_VERSION
5959 OUTPUT_STRIP_TRAILING_WHITESPACE)
6060
61 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 13)
62 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
61 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 14)
62 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
6363 endif()
64 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 14)
65 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
64 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 15)
65 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
6666 endif()
67 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 14)
68 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
67 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 15)
68 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
6969 endif()
7070elseif(ZIG_USE_LLVM_CONFIG)
7171 find_program(LLVM_CONFIG_EXE
72 NAMES llvm-config-13 llvm-config-13.0 llvm-config130 llvm-config13 llvm-config
72 NAMES llvm-config-14 llvm-config-14.0 llvm-config140 llvm-config14 llvm-config
7373 PATHS
7474 "/mingw64/bin"
7575 "/c/msys64/mingw64/bin"
7676 "c:/msys64/mingw64/bin"
77 "C:/Libraries/llvm-13.0.0/bin")
77 "C:/Libraries/llvm-14.0.0/bin")
7878
7979 if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
8080 message(FATAL_ERROR "unable to find llvm-config")
......@@ -89,14 +89,14 @@ elseif(ZIG_USE_LLVM_CONFIG)
8989 OUTPUT_VARIABLE LLVM_CONFIG_VERSION
9090 OUTPUT_STRIP_TRAILING_WHITESPACE)
9191
92 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 13)
93 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
92 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 14)
93 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
9494 endif()
95 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 14)
96 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
95 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 15)
96 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
9797 endif()
98 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 14)
99 message(FATAL_ERROR "expected LLVM 13.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
98 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 15)
99 message(FATAL_ERROR "expected LLVM 14.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}")
100100 endif()
101101
102102 execute_process(
......@@ -170,7 +170,7 @@ elseif(ZIG_USE_LLVM_CONFIG)
170170 set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
171171
172172 if(NOT LLVM_LIBRARIES)
173 find_library(LLVM_LIBRARIES NAMES LLVM LLVM-13 LLVM-13.0)
173 find_library(LLVM_LIBRARIES NAMES LLVM LLVM-14 LLVM-14.0)
174174 endif()
175175
176176 link_directories("${CMAKE_PREFIX_PATH}/lib")
......@@ -184,13 +184,13 @@ else()
184184 find_library(LLVM_${_prettylibname_}_LIB NAMES ${_libname_}
185185 PATHS
186186 ${LLVM_LIBDIRS}
187 /usr/lib/llvm/13/lib
188 /usr/lib/llvm-13/lib
189 /usr/lib/llvm-13.0/lib
190 /usr/local/llvm130/lib
191 /usr/local/llvm13/lib
192 /usr/local/opt/llvm@13/lib
193 /opt/homebrew/opt/llvm@13/lib
187 /usr/lib/llvm/14/lib
188 /usr/lib/llvm-14/lib
189 /usr/lib/llvm-14.0/lib
190 /usr/local/llvm140/lib
191 /usr/local/llvm14/lib
192 /usr/local/opt/llvm@14/lib
193 /opt/homebrew/opt/llvm@14/lib
194194 /mingw64/lib
195195 /c/msys64/mingw64/lib
196196 c:\\msys64\\mingw64\\lib)