authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-07-24 16:49:43-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-07-24 16:49:43-07:00
logcd91e17b7384fe857c5cf847b106cd0f98cb4d6a
tree191f674ebfbf15cc4ec221cc2700ee6c618f7f24
parent995fd7314cd230ca7c829bb478f88b1ab7efd7b4

update LLVM 10 version numbers to 11


4 files changed, 51 insertions(+), 59 deletions(-)

README.md+2-10
...@@ -27,7 +27,7 @@ Note that you can...@@ -27,7 +27,7 @@ Note that you can
2727
28 * cmake >= 2.8.528 * cmake >= 2.8.5
29 * gcc >= 5.0.0 or clang >= 3.6.029 * gcc >= 5.0.0 or clang >= 3.6.0
30 * LLVM, Clang, LLD development libraries == 10.x, compiled with the same gcc or clang version above30 * LLVM, Clang, LLD development libraries == 11.x, compiled with the same gcc or clang version above
31 - Use the system package manager, or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#posix).31 - Use the system package manager, or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#posix).
3232
33##### Windows33##### Windows
...@@ -37,7 +37,7 @@ Note that you can...@@ -37,7 +37,7 @@ Note that you can
37 - 2015 (version 14)37 - 2015 (version 14)
38 - 2017 (version 15.8)38 - 2017 (version 15.8)
39 - 2019 (version 16)39 - 2019 (version 16)
40 * LLVM, Clang, LLD development libraries == 10.x40 * LLVM, Clang, LLD development libraries == 11.x
41 - Use the [pre-built binaries](https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows) or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#windows).41 - Use the [pre-built binaries](https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows) or [build from source](https://github.com/ziglang/zig/wiki/How-to-build-LLVM,-libclang,-and-liblld-from-source#windows).
4242
43#### Instructions43#### Instructions
...@@ -64,14 +64,6 @@ cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)...@@ -64,14 +64,6 @@ cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)
64make install64make install
65```65```
6666
67You will now run into this issue:
68[homebrew and llvm 10 packages in apt.llvm.org are broken with undefined reference to getPollyPluginInfo](https://github.com/ziglang/zig/issues/4799)
69or
70[error: unable to create target: 'Unable to find target for this triple (no targets are registered)'](https://github.com/ziglang/zig/issues/5055),
71in which case try `-DZIG_WORKAROUND_4799=ON`
72
73Hopefully this will be fixed upstream with LLVM 10.0.1.
74
75##### Windows67##### Windows
7668
77See https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows69See https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows
cmake/Findclang.cmake+15-15
...@@ -9,25 +9,25 @@...@@ -9,25 +9,25 @@
99
10find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h10find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
11 PATHS11 PATHS
12 /usr/lib/llvm/10/include12 /usr/lib/llvm/11/include
13 /usr/lib/llvm-10/include13 /usr/lib/llvm-11/include
14 /usr/lib/llvm-10.0/include14 /usr/lib/llvm-11.0/include
15 /usr/local/llvm100/include15 /usr/local/llvm110/include
16 /usr/local/llvm10/include16 /usr/local/llvm11/include
17 /mingw64/include17 /mingw64/include
18)18)
1919
20if(ZIG_PREFER_CLANG_CPP_DYLIB)20if(ZIG_PREFER_CLANG_CPP_DYLIB)
21 find_library(CLANG_LIBRARIES21 find_library(CLANG_LIBRARIES
22 NAMES22 NAMES
23 clang-cpp-10.023 clang-cpp-11.0
24 clang-cpp10024 clang-cpp110
25 clang-cpp25 clang-cpp
26 PATHS26 PATHS
27 ${CLANG_LIBDIRS}27 ${CLANG_LIBDIRS}
28 /usr/lib/llvm-10/lib28 /usr/lib/llvm-11/lib
29 /usr/local/llvm100/lib29 /usr/local/llvm110/lib
30 /usr/local/llvm10/lib30 /usr/local/llvm11/lib
31 )31 )
32endif()32endif()
3333
...@@ -37,11 +37,11 @@ if(NOT CLANG_LIBRARIES)...@@ -37,11 +37,11 @@ if(NOT CLANG_LIBRARIES)
37 find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}37 find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
38 PATHS38 PATHS
39 ${CLANG_LIBDIRS}39 ${CLANG_LIBDIRS}
40 /usr/lib/llvm/10/lib40 /usr/lib/llvm/11/lib
41 /usr/lib/llvm-10/lib41 /usr/lib/llvm-11/lib
42 /usr/lib/llvm-10.0/lib42 /usr/lib/llvm-11.0/lib
43 /usr/local/llvm100/lib43 /usr/local/llvm110/lib
44 /usr/local/llvm10/lib44 /usr/local/llvm11/lib
45 /mingw64/lib45 /mingw64/lib
46 /c/msys64/mingw64/lib46 /c/msys64/mingw64/lib
47 c:\\msys64\\mingw64\\lib47 c:\\msys64\\mingw64\\lib
cmake/Findlld.cmake+10-10
...@@ -8,16 +8,16 @@...@@ -8,16 +8,16 @@
88
9find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h9find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
10 PATHS10 PATHS
11 /usr/lib/llvm-10/include11 /usr/lib/llvm-11/include
12 /usr/local/llvm100/include12 /usr/local/llvm110/include
13 /usr/local/llvm10/include13 /usr/local/llvm11/include
14 /mingw64/include)14 /mingw64/include)
1515
16find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld16find_library(LLD_LIBRARY NAMES lld-11.0 lld110 lld
17 PATHS17 PATHS
18 /usr/lib/llvm-10/lib18 /usr/lib/llvm-11/lib
19 /usr/local/llvm100/lib19 /usr/local/llvm110/lib
20 /usr/local/llvm10/lib20 /usr/local/llvm11/lib
21)21)
22if(EXISTS ${LLD_LIBRARY})22if(EXISTS ${LLD_LIBRARY})
23 set(LLD_LIBRARIES ${LLD_LIBRARY})23 set(LLD_LIBRARIES ${LLD_LIBRARY})
...@@ -27,9 +27,9 @@ else()...@@ -27,9 +27,9 @@ else()
27 find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}27 find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
28 PATHS28 PATHS
29 ${LLD_LIBDIRS}29 ${LLD_LIBDIRS}
30 /usr/lib/llvm-10/lib30 /usr/lib/llvm-11/lib
31 /usr/local/llvm100/lib31 /usr/local/llvm110/lib
32 /usr/local/llvm10/lib32 /usr/local/llvm11/lib
33 /mingw64/lib33 /mingw64/lib
34 /c/msys64/mingw64/lib34 /c/msys64/mingw64/lib
35 c:/msys64/mingw64/lib)35 c:/msys64/mingw64/lib)
cmake/Findllvm.cmake+24-24
...@@ -9,35 +9,35 @@...@@ -9,35 +9,35 @@
99
10find_path(LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h10find_path(LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h
11 PATHS11 PATHS
12 /usr/lib/llvm/10/include12 /usr/lib/llvm/11/include
13 /usr/lib/llvm-10/include13 /usr/lib/llvm-11/include
14 /usr/lib/llvm-10.0/include14 /usr/lib/llvm-11.0/include
15 /usr/local/llvm10/include15 /usr/local/llvm11/include
16 /usr/local/llvm100/include16 /usr/local/llvm110/include
17 /mingw64/include17 /mingw64/include
18)18)
1919
20if(ZIG_PREFER_CLANG_CPP_DYLIB)20if(ZIG_PREFER_CLANG_CPP_DYLIB)
21 find_library(LLVM_LIBRARIES21 find_library(LLVM_LIBRARIES
22 NAMES22 NAMES
23 LLVM-10.023 LLVM-11.0
24 LLVM-1024 LLVM-11
25 LLVM-10025 LLVM-110
26 LLVM26 LLVM
27 PATHS27 PATHS
28 ${LLVM_LIBDIRS}28 ${LLVM_LIBDIRS}
29 /usr/lib/llvm-10/lib29 /usr/lib/llvm-11/lib
30 /usr/local/llvm10/lib30 /usr/local/llvm11/lib
31 /usr/local/llvm100/lib31 /usr/local/llvm110/lib
32 )32 )
33elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")33elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
34 find_program(LLVM_CONFIG_EXE34 find_program(LLVM_CONFIG_EXE
35 NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config35 NAMES llvm-config-11 llvm-config-11.0 llvm-config110 llvm-config11 llvm-config
36 PATHS36 PATHS
37 "/mingw64/bin"37 "/mingw64/bin"
38 "/c/msys64/mingw64/bin"38 "/c/msys64/mingw64/bin"
39 "c:/msys64/mingw64/bin"39 "c:/msys64/mingw64/bin"
40 "C:/Libraries/llvm-10.0.0/bin")40 "C:/Libraries/llvm-11.0.0/bin")
4141
42 if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")42 if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
43 message(FATAL_ERROR "unable to find llvm-config")43 message(FATAL_ERROR "unable to find llvm-config")
...@@ -52,14 +52,14 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")...@@ -52,14 +52,14 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
52 OUTPUT_VARIABLE LLVM_CONFIG_VERSION52 OUTPUT_VARIABLE LLVM_CONFIG_VERSION
53 OUTPUT_STRIP_TRAILING_WHITESPACE)53 OUTPUT_STRIP_TRAILING_WHITESPACE)
5454
55 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 10)55 if("${LLVM_CONFIG_VERSION}" VERSION_LESS 11)
56 message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")56 message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
57 endif()57 endif()
58 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 11)58 if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12)
59 message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")59 message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
60 endif()60 endif()
61 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)61 if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)
62 message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")62 message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
63 endif()63 endif()
6464
65 execute_process(65 execute_process(
...@@ -132,7 +132,7 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")...@@ -132,7 +132,7 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
132 set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})132 set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
133133
134 if(NOT LLVM_LIBRARIES)134 if(NOT LLVM_LIBRARIES)
135 find_library(LLVM_LIBRARIES NAMES LLVM LLVM-10 LLVM-10.0)135 find_library(LLVM_LIBRARIES NAMES LLVM LLVM-11 LLVM-11.0)
136 endif()136 endif()
137137
138 link_directories("${CMAKE_PREFIX_PATH}/lib")138 link_directories("${CMAKE_PREFIX_PATH}/lib")
...@@ -147,11 +147,11 @@ else()...@@ -147,11 +147,11 @@ else()
147 find_library(LLVM_${_prettylibname_}_LIB NAMES ${_libname_}147 find_library(LLVM_${_prettylibname_}_LIB NAMES ${_libname_}
148 PATHS148 PATHS
149 ${LLVM_LIBDIRS}149 ${LLVM_LIBDIRS}
150 /usr/lib/llvm/10/lib150 /usr/lib/llvm/11/lib
151 /usr/lib/llvm-10/lib151 /usr/lib/llvm-11/lib
152 /usr/lib/llvm-10.0/lib152 /usr/lib/llvm-11.0/lib
153 /usr/local/llvm100/lib153 /usr/local/llvm110/lib
154 /usr/local/llvm10/lib154 /usr/local/llvm11/lib
155 /mingw64/lib155 /mingw64/lib
156 /c/msys64/mingw64/lib156 /c/msys64/mingw64/lib
157 c:\\msys64\\mingw64\\lib)157 c:\\msys64\\mingw64\\lib)