llvm: update
This commit is contained in:
parent
f48f0524a3
commit
bd66ced110
1 changed files with 101 additions and 76 deletions
|
@ -1,4 +1,4 @@
|
||||||
pkgver=13.0.1
|
pkgver=14.0.1
|
||||||
pkgname=llvm
|
pkgname=llvm
|
||||||
bad=""
|
bad=""
|
||||||
ext="dev"
|
ext="dev"
|
||||||
|
@ -7,10 +7,32 @@ fetch() {
|
||||||
curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.gz
|
curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz" -o $pkgname-$pkgver.tar.gz
|
||||||
tar -xf $pkgname-$pkgver.tar.gz
|
tar -xf $pkgname-$pkgver.tar.gz
|
||||||
mv llvm-project-$pkgver.src $pkgname-$pkgver
|
mv llvm-project-$pkgver.src $pkgname-$pkgver
|
||||||
|
|
||||||
|
cd $pkgname-$pkgver
|
||||||
|
patch -p1 < ../../riscv-relax.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
|
|
||||||
|
if [ ! -z "$WITH_CROSS" ]; then
|
||||||
|
EXTRA_ARGS="-DCMAKE_SYSROOT=/usr/$ARCH-linux-musl \
|
||||||
|
-DCMAKE_C_COMPILER_WORKS=ON \
|
||||||
|
-DCMAKE_CXX_COMPILER_WORKS=ON \
|
||||||
|
-DCMAKE_SYSTEM_NAME=Linux \
|
||||||
|
-DLLVM_TABLEGEN=$(pwd)/host-build/bin/llvm-tblgen \
|
||||||
|
-DCLANG_TABLEGEN=$(pwd)/host-build/bin/clang-tblgen"
|
||||||
|
mkdir -p host-build
|
||||||
|
cd host-build
|
||||||
|
cmake -G Ninja -Wno-dev \
|
||||||
|
-DLLVM_ENABLE_PROJECTS='clang' \
|
||||||
|
../llvm
|
||||||
|
|
||||||
|
samu llvm-tblgen clang-tblgen
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
cmake -G Ninja -Wno-dev \
|
cmake -G Ninja -Wno-dev \
|
||||||
|
@ -20,7 +42,7 @@ build() {
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DLLVM_VERSION_SUFFIX="" \
|
-DLLVM_VERSION_SUFFIX="" \
|
||||||
-DLLVM_APPEND_VC_REV=OFF \
|
-DLLVM_APPEND_VC_REV=OFF \
|
||||||
-DLLVM_ENABLE_PROJECTS="libunwind;libcxxabi;libcxx;compiler-rt;llvm;lld;clang;clang-tools-extra;lldb" \
|
-DLLVM_ENABLE_PROJECTS="llvm;lld;clang;lldb;clang-tools-extra" \
|
||||||
-DLLVM_ENABLE_LLD=ON \
|
-DLLVM_ENABLE_LLD=ON \
|
||||||
-DLLVM_TARGETS_TO_BUILD="all" \
|
-DLLVM_TARGETS_TO_BUILD="all" \
|
||||||
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
|
||||||
|
@ -77,6 +99,7 @@ build() {
|
||||||
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
|
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
|
||||||
-DCLANG_ENABLE_ARCMT=OFF \
|
-DCLANG_ENABLE_ARCMT=OFF \
|
||||||
-DCLANG_LINK_CLANG_DYLIB=OFF \
|
-DCLANG_LINK_CLANG_DYLIB=OFF \
|
||||||
|
-DCLANG_TOOLING_BUILD_AST_INTROSPECTION=OFF \
|
||||||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \
|
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \
|
||||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \
|
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=OFF \
|
||||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF \
|
-DCOMPILER_RT_INCLUDE_TESTS=OFF \
|
||||||
|
@ -86,7 +109,9 @@ build() {
|
||||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF \
|
-DCOMPILER_RT_INCLUDE_TESTS=OFF \
|
||||||
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
|
-DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
|
||||||
-DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=TRUE \
|
-DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=TRUE \
|
||||||
-DCAN_TARGET_i386=1 \
|
$EXTRA_ARGS \
|
||||||
|
-DHAVE_CXX_ATOMICS_WITHOUT_LIB=ON \
|
||||||
|
-DHAVE_CXX_ATOMICS64_WITHOUT_LIB=ON \
|
||||||
../llvm
|
../llvm
|
||||||
|
|
||||||
samu -j$JOBS
|
samu -j$JOBS
|
||||||
|
|
Loading…
Reference in a new issue