llvm 9.0.0 => llvm 10.0.0
parent
f84086132f
commit
6f10e3fda6
|
@ -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 == 9.x, compiled with the same gcc or clang version above
|
||||
* LLVM, Clang, LLD development libraries == 10.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 == 9.x
|
||||
* LLVM, Clang, LLD development libraries == 10.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
|
||||
|
@ -54,8 +54,8 @@ make install
|
|||
##### MacOS
|
||||
|
||||
```
|
||||
brew install cmake llvm@9
|
||||
brew outdated llvm@9 || brew upgrade llvm@9
|
||||
brew install cmake llvm@10
|
||||
brew outdated llvm@10 || brew upgrade llvm@10
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_PREFIX_PATH=$(brew --prefix llvm)
|
||||
|
|
|
@ -8,7 +8,7 @@ system_profiler SPHardwareDataType
|
|||
brew install s3cmd gcc@8
|
||||
|
||||
ZIGDIR="$(pwd)"
|
||||
CACHE_BASENAME="llvm+clang-9.0.0-macos-x86_64-gcc8-release"
|
||||
CACHE_BASENAME="llvm+clang-10.0.0-macos-x86_64-gcc8-release"
|
||||
PREFIX="$HOME/$CACHE_BASENAME"
|
||||
TMPDIR="$HOME/tmpz"
|
||||
JOBS="-j2"
|
||||
|
@ -44,18 +44,18 @@ else
|
|||
rm $PREFIX/lib/libz*dylib
|
||||
|
||||
cd $TMPDIR
|
||||
wget https://releases.llvm.org/9.0.0/llvm-9.0.0.src.tar.xz
|
||||
tar xf llvm-9.0.0.src.tar.xz
|
||||
cd llvm-9.0.0.src/
|
||||
wget https://releases.llvm.org/10.0.0/llvm-10.0.0.src.tar.xz
|
||||
tar xf llvm-10.0.0.src.tar.xz
|
||||
cd llvm-10.0.0.src/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Release -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AVR" -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF
|
||||
make $JOBS install
|
||||
|
||||
cd $TMPDIR
|
||||
wget https://releases.llvm.org/9.0.0/cfe-9.0.0.src.tar.xz
|
||||
tar xf cfe-9.0.0.src.tar.xz
|
||||
cd cfe-9.0.0.src/
|
||||
wget https://releases.llvm.org/10.0.0/cfe-10.0.0.src.tar.xz
|
||||
tar xf cfe-10.0.0.src.tar.xz
|
||||
cd cfe-10.0.0.src/
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_BUILD_TYPE=Release
|
||||
|
|
|
@ -6,5 +6,5 @@ set -e
|
|||
pacman -Su --needed --noconfirm
|
||||
pacman -S --needed --noconfirm wget p7zip python3-pip
|
||||
pip install s3cmd
|
||||
wget -nv "https://ziglang.org/deps/llvm%2bclang-9.0.0-win64-msvc-release.tar.xz"
|
||||
tar xf llvm+clang-9.0.0-win64-msvc-release.tar.xz
|
||||
wget -nv "https://ziglang.org/deps/llvm%2bclang-10.0.0-win64-msvc-release.tar.xz"
|
||||
tar xf llvm+clang-10.0.0-win64-msvc-release.tar.xz
|
||||
|
|
|
@ -11,7 +11,7 @@ SET "MSYSTEM=%PREVMSYSTEM%"
|
|||
|
||||
SET "ZIGBUILDDIR=%SRCROOT%\build"
|
||||
SET "ZIGINSTALLDIR=%ZIGBUILDDIR%\dist"
|
||||
SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang-9.0.0-win64-msvc-release"
|
||||
SET "ZIGPREFIXPATH=%SRCROOT%\llvm+clang-10.0.0-win64-msvc-release"
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ set -x
|
|||
set -e
|
||||
|
||||
ZIGDIR="$(pwd)"
|
||||
CACHE_BASENAME="llvm+clang-9.0.0-freebsd-x86_64-release"
|
||||
CACHE_BASENAME="llvm+clang-10.0.0-freebsd-x86_64-release"
|
||||
PREFIX="$HOME/$CACHE_BASENAME"
|
||||
JOBS="-j$(sysctl -n hw.ncpu)"
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ if(MSVC)
|
|||
else()
|
||||
find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
|
||||
PATHS
|
||||
/usr/lib/llvm/9/include
|
||||
/usr/lib/llvm-9/include
|
||||
/usr/lib/llvm-9.0/include
|
||||
/usr/local/llvm90/include
|
||||
/usr/lib/llvm/10/include
|
||||
/usr/lib/llvm-10/include
|
||||
/usr/lib/llvm-10.0/include
|
||||
/usr/local/llvm100/include
|
||||
/mingw64/include)
|
||||
|
||||
macro(FIND_AND_ADD_CLANG_LIB _libname_)
|
||||
|
@ -49,10 +49,10 @@ else()
|
|||
find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||
PATHS
|
||||
${CLANG_LIBDIRS}
|
||||
/usr/lib/llvm/9/lib
|
||||
/usr/lib/llvm-9/lib
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
/usr/lib/llvm/10/lib
|
||||
/usr/lib/llvm-10/lib
|
||||
/usr/lib/llvm-10.0/lib
|
||||
/usr/local/llvm100/lib
|
||||
/mingw64/lib
|
||||
/c/msys64/mingw64/lib
|
||||
c:\\msys64\\mingw64\\lib)
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
|
||||
PATHS
|
||||
/usr/lib/llvm-9.0/include
|
||||
/usr/local/llvm90/include
|
||||
/usr/lib/llvm-10.0/include
|
||||
/usr/local/llvm100/include
|
||||
/mingw64/include)
|
||||
|
||||
find_library(LLD_LIBRARY NAMES lld-9.0 lld90 lld
|
||||
find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
|
||||
PATHS
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
/usr/lib/llvm-10.0/lib
|
||||
/usr/local/llvm100/lib
|
||||
)
|
||||
if(EXISTS ${LLD_LIBRARY})
|
||||
set(LLD_LIBRARIES ${LLD_LIBRARY})
|
||||
|
@ -24,8 +24,8 @@ else()
|
|||
string(TOUPPER ${_libname_} _prettylibname_)
|
||||
find_library(LLD_${_prettylibname_}_LIB NAMES ${_libname_}
|
||||
PATHS
|
||||
/usr/lib/llvm-9.0/lib
|
||||
/usr/local/llvm90/lib
|
||||
/usr/lib/llvm-10.0/lib
|
||||
/usr/local/llvm100/lib
|
||||
/mingw64/lib
|
||||
/c/msys64/mingw64/lib
|
||||
c:/msys64/mingw64/lib)
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
# LLVM_LIBDIRS
|
||||
|
||||
find_program(LLVM_CONFIG_EXE
|
||||
NAMES llvm-config-9 llvm-config-9.0 llvm-config90 llvm-config
|
||||
NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config
|
||||
PATHS
|
||||
"/mingw64/bin"
|
||||
"/c/msys64/mingw64/bin"
|
||||
"c:/msys64/mingw64/bin"
|
||||
"C:/Libraries/llvm-9.0.0/bin")
|
||||
"C:/Libraries/llvm-10.0.0/bin")
|
||||
|
||||
if ("${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND")
|
||||
message(FATAL_ERROR "unable to find llvm-config")
|
||||
|
@ -28,14 +28,14 @@ execute_process(
|
|||
OUTPUT_VARIABLE LLVM_CONFIG_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 9)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_LESS 10)
|
||||
message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 10)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_EQUAL 11)
|
||||
message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 10)
|
||||
message(FATAL_ERROR "expected LLVM 9.x but found ${LLVM_CONFIG_VERSION}")
|
||||
if("${LLVM_CONFIG_VERSION}" VERSION_GREATER 11)
|
||||
message(FATAL_ERROR "expected LLVM 10.x but found ${LLVM_CONFIG_VERSION}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
|
@ -113,7 +113,7 @@ execute_process(
|
|||
set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
|
||||
|
||||
if(NOT LLVM_LIBRARIES)
|
||||
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-9 LLVM-9.0)
|
||||
find_library(LLVM_LIBRARIES NAMES LLVM LLVM-10 LLVM-10.0)
|
||||
endif()
|
||||
|
||||
link_directories("${CMAKE_PREFIX_PATH}/lib")
|
||||
|
|
|
@ -5882,7 +5882,7 @@ volatile (
|
|||
// Next is the output constraint string. This feature is still
|
||||
// considered unstable in Zig, and so LLVM/GCC documentation
|
||||
// must be used to understand the semantics.
|
||||
// http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string
|
||||
// http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string
|
||||
// https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html
|
||||
// In this example, the constraint string means "the result value of
|
||||
// this inline assembly instruction is whatever is in $rax".
|
||||
|
@ -5923,7 +5923,7 @@ volatile (
|
|||
<p>
|
||||
Output constraints are still considered to be unstable in Zig, and
|
||||
so
|
||||
<a href="http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a>
|
||||
<a href="http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a>
|
||||
and
|
||||
<a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html">GCC documentation</a>
|
||||
must be used to understand the semantics.
|
||||
|
@ -5938,7 +5938,7 @@ volatile (
|
|||
<p>
|
||||
Input constraints are still considered to be unstable in Zig, and
|
||||
so
|
||||
<a href="http://releases.llvm.org/9.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a>
|
||||
<a href="http://releases.llvm.org/10.0.0/docs/LangRef.html#inline-asm-constraint-string">LLVM documentation</a>
|
||||
and
|
||||
<a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html">GCC documentation</a>
|
||||
must be used to understand the semantics.
|
||||
|
|
Loading…
Reference in New Issue