Juergen Daubert
1465eabfd9
we define LLVM_BUILD_LLVM_DYLIB=1 BUT not LLVM_LINK_LLVM_DYLIB=1 which leads to a broken llvm-config. Currently $> llvm-config --libnames --link-shared generated lots of errors about missing .so libraries, with the above addition we get the correct behaviour. $> llvm-config --libnames --link-shared libLLVM-7.so
44 lines
1019 B
Plaintext
44 lines
1019 B
Plaintext
# Description: LLVM compiler backend
|
|
# URL: http://llvm.org/
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
|
# Depends on: cmake libffi ninja
|
|
|
|
name=llvm
|
|
version=7.0.0
|
|
release=2
|
|
source=(https://llvm.org/releases/$version/$name-$version.src.tar.xz
|
|
llvm-config.h)
|
|
|
|
build() {
|
|
export CC=gcc
|
|
export CXX=g++
|
|
|
|
cd $name-$version.src
|
|
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake .. -G Ninja \
|
|
-DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
|
|
-DLLVM_ENABLE_CXX1Y=1 \
|
|
-DLLVM_INCLUDE_EXAMPLES=0 \
|
|
-DLLVM_INCLUDE_TESTS=0 \
|
|
-DLLVM_ENABLE_FFI=1 \
|
|
-DLLVM_ENABLE_OCAMLDOC=0 \
|
|
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
|
|
-DLLVM_BUILD_LLVM_DYLIB=1 \
|
|
-DLLVM_LINK_LLVM_DYLIB=1 \
|
|
-DLLVM_INSTALL_UTILS=1 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DLLVM_APPEND_VC_REV=0 \
|
|
-Wno-dev
|
|
|
|
ninja
|
|
DESTDIR=$PKG ninja install
|
|
|
|
# multilib stub
|
|
mv $PKG/usr/include/llvm/Config/llvm-config{,-64}.h
|
|
install -m 0644 $SRC/llvm-config.h $PKG/usr/include/llvm/Config/
|
|
}
|