Commit cd91e17b73
Changed files (4)
cmake/Findclang.cmake
@@ -9,25 +9,25 @@
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
PATHS
- /usr/lib/llvm/10/include
- /usr/lib/llvm-10/include
- /usr/lib/llvm-10.0/include
- /usr/local/llvm100/include
- /usr/local/llvm10/include
+ /usr/lib/llvm/11/include
+ /usr/lib/llvm-11/include
+ /usr/lib/llvm-11.0/include
+ /usr/local/llvm110/include
+ /usr/local/llvm11/include
/mingw64/include
)
if(ZIG_PREFER_CLANG_CPP_DYLIB)
find_library(CLANG_LIBRARIES
NAMES
- clang-cpp-10.0
- clang-cpp100
+ clang-cpp-11.0
+ clang-cpp110
clang-cpp
PATHS
${CLANG_LIBDIRS}
- /usr/lib/llvm-10/lib
- /usr/local/llvm100/lib
- /usr/local/llvm10/lib
+ /usr/lib/llvm-11/lib
+ /usr/local/llvm110/lib
+ /usr/local/llvm11/lib
)
endif()
@@ -37,11 +37,11 @@ if(NOT CLANG_LIBRARIES)
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
${CLANG_LIBDIRS}
- /usr/lib/llvm/10/lib
- /usr/lib/llvm-10/lib
- /usr/lib/llvm-10.0/lib
- /usr/local/llvm100/lib
- /usr/local/llvm10/lib
+ /usr/lib/llvm/11/lib
+ /usr/lib/llvm-11/lib
+ /usr/lib/llvm-11.0/lib
+ /usr/local/llvm110/lib
+ /usr/local/llvm11/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib
cmake/Findlld.cmake
@@ -8,16 +8,16 @@
find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
PATHS
- /usr/lib/llvm-10/include
- /usr/local/llvm100/include
- /usr/local/llvm10/include
+ /usr/lib/llvm-11/include
+ /usr/local/llvm110/include
+ /usr/local/llvm11/include
/mingw64/include)
-find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
+find_library(LLD_LIBRARY NAMES lld-11.0 lld110 lld
PATHS
- /usr/lib/llvm-10/lib
- /usr/local/llvm100/lib
- /usr/local/llvm10/lib
+ /usr/lib/llvm-11/lib
+ /usr/local/llvm110/lib
+ /usr/local/llvm11/lib
)
if(EXISTS ${LLD_LIBRARY})
set(LLD_LIBRARIES ${LLD_LIBRARY})
@@ -27,9 +27,9 @@ else()
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
${LLD_LIBDIRS}
- /usr/lib/llvm-10/lib
- /usr/local/llvm100/lib
- /usr/local/llvm10/lib
+ /usr/lib/llvm-11/lib
+ /usr/local/llvm110/lib
+ /usr/local/llvm11/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:/msys64/mingw64/lib)
cmake/Findllvm.cmake
@@ -9,35 +9,35 @@
find_path(LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h
PATHS
- /usr/lib/llvm/10/include
- /usr/lib/llvm-10/include
- /usr/lib/llvm-10.0/include
- /usr/local/llvm10/include
- /usr/local/llvm100/include
+ /usr/lib/llvm/11/include
+ /usr/lib/llvm-11/include
+ /usr/lib/llvm-11.0/include
+ /usr/local/llvm11/include
+ /usr/local/llvm110/include
/mingw64/include
)
if(ZIG_PREFER_CLANG_CPP_DYLIB)
find_library(LLVM_LIBRARIES
NAMES
- LLVM-10.0
- LLVM-10
- LLVM-100
+ LLVM-11.0
+ LLVM-11
+ LLVM-110
LLVM
PATHS
${LLVM_LIBDIRS}
- /usr/lib/llvm-10/lib
- /usr/local/llvm10/lib
- /usr/local/llvm100/lib
+ /usr/lib/llvm-11/lib
+ /usr/local/llvm11/lib
+ /usr/local/llvm110/lib
)
elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
find_program(LLVM_CONFIG_EXE
- NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
+ NAMES llvm-config-11 llvm-config-11.0 llvm-config110 llvm-config11 llvm-config
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
"c:/msys64/mingw64/bin"
- "C:/Libraries/llvm-10.0.0/bin")
+ "C:/Libraries/llvm-11.0.0/bin")
if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
message(FATAL_ERROR "unable to find llvm-config")
@@ -52,14 +52,14 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
OUTPUT_VARIABLE LLVM_CONFIG_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if("${LLVM_CONFIG_VERSION}" VERSION_LESS 10)
- message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
+ if("${LLVM_CONFIG_VERSION}" VERSION_LESS 11)
+ message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
endif()
- if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 11)
- message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
+ if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 12)
+ message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
endif()
if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)
- message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
+ message(FATAL_ERROR "expected LLVM 11.x but found ${LLVM_CONFIG_VERSION}")
endif()
execute_process(
@@ -132,7 +132,7 @@ elseif("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
if(NOT LLVM_LIBRARIES)
- find_library(LLVM_LIBRARIES NAMES LLVM LLVM-10 LLVM-10.0)
+ find_library(LLVM_LIBRARIES NAMES LLVM LLVM-11 LLVM-11.0)
endif()
link_directories("${CMAKE_PREFIX_PATH}/lib")
@@ -147,11 +147,11 @@ else()
find_library(LLVM_${_prettylibname_}_LIB NAMES ${_libname_}
PATHS
${LLVM_LIBDIRS}
- /usr/lib/llvm/10/lib
- /usr/lib/llvm-10/lib
- /usr/lib/llvm-10.0/lib
- /usr/local/llvm100/lib
- /usr/local/llvm10/lib
+ /usr/lib/llvm/11/lib
+ /usr/lib/llvm-11/lib
+ /usr/lib/llvm-11.0/lib
+ /usr/local/llvm110/lib
+ /usr/local/llvm11/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)
README.md
@@ -27,7 +27,7 @@ Note that you can
* cmake >= 2.8.5
* gcc >= 5.0.0 or clang >= 3.6.0
- * LLVM, Clang, LLD development libraries == 10.x, compiled with the same gcc or clang version above
+ * LLVM, Clang, LLD development libraries == 11.x, compiled with the same gcc or clang version above
- 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).
##### Windows
@@ -37,7 +37,7 @@ Note that you can
- 2015 (version 14)
- 2017 (version 15.8)
- 2019 (version 16)
- * LLVM, Clang, LLD development libraries == 10.x
+ * LLVM, Clang, LLD development libraries == 11.x
- 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).
#### Instructions
@@ -64,14 +64,6 @@ cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)
make install
```
-You will now run into this issue:
-[homebrew and llvm 10 packages in apt.llvm.org are broken with undefined reference to getPollyPluginInfo](https://github.com/ziglang/zig/issues/4799)
-or
-[error: unable to create target: 'Unable to find target for this triple (no targets are registered)'](https://github.com/ziglang/zig/issues/5055),
-in which case try `-DZIG_WORKAROUND_4799=ON`
-
-Hopefully this will be fixed upstream with LLVM 10.0.1.
-
##### Windows
See https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows