makedeb
Low Level Virtual Machine 13 for clasp
Viewing /PKGBUILD
.
Click here to go back to the Git tree for llvm13.
# Maintainer: Tarn W. Burton <twburton@gmail.com>
pkgname=('llvm13')
pkgver=13.r5140.g972b6a3a3471
pkgrel=1
pkgdesc="Low Level Virtual Machine 13 for clasp"
arch=('x86_64')
url="https://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('binutils')
makedepends=('cmake' 'libffi-dev' 'libedit-dev' 'libncurses-dev' 'libxml2-dev' 'binutils-dev' 'python3-distutils')
options=('staticlibs')
source=("llvm-project::git+https://github.com/llvm/llvm-project.git#commit=972b6a3a3471c2a742c5c5d8ec004ff640d544c4")
md5sums=('SKIP')
sha512sums=('SKIP')
#pkgver() {
# if [ -d "llvm-project" ]; then
# cd llvm-project
# git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed -E 's/[a-z]+\.//g'
# else
# echo $pkgver
# fi
#}
build() {
sed -i 's/::lldb_private::Timer _scoped_timer(_cat, LLVM_PRETTY_FUNCTION)/::lldb_private::Timer _scoped_timer(_cat, "%s", LLVM_PRETTY_FUNCTION)/g' llvm-project/lldb/include/lldb/Utility/Timer.h
mkdir -p build
cd build
cmake -G "Unix Makefiles" \
-DLLVM_BINUTILS_INCDIR=/usr/local/opt/binutils/include \
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF \
-DLINK_POLLY_INTO_TOOLS=ON \
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_EH=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_LIBCXX=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DLLVM_ENABLE_PROJECTS=clang\;compiler-rt\;libcxxabi\;libcxx\;lldb \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_POLLY=ON \
-DCMAKE_INSTALL_PREFIX=/opt/llvm13 \
../llvm-project/llvm
make -j 4
}
package() {
cd build
DESTDIR="$pkgdir" make -j 4 install
mkdir -p "$pkgdir/etc/ld.so.conf.d/"
echo "/opt/llvm13/lib" > "$pkgdir/etc/ld.so.conf.d/70-llvm13.conf"
}