2014-05-14 13:10:14 +02:00
|
|
|
# Description: LLVM compiler backend
|
|
|
|
# URL: http://llvm.org/
|
2012-07-05 16:19:11 +02:00
|
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
2018-07-28 14:44:40 +10:00
|
|
|
# Depends on: cmake libffi ninja
|
2010-04-27 20:03:12 +02:00
|
|
|
|
|
|
|
name=llvm
|
2018-10-03 01:32:20 +02:00
|
|
|
version=7.0.0
|
2018-12-12 10:12:16 +01:00
|
|
|
release=2
|
2018-04-13 01:02:27 +10:00
|
|
|
source=(https://llvm.org/releases/$version/$name-$version.src.tar.xz
|
2018-07-28 14:44:40 +10:00
|
|
|
llvm-config.h)
|
2010-04-27 20:03:12 +02:00
|
|
|
|
|
|
|
build() {
|
2016-05-15 20:00:18 +02:00
|
|
|
export CC=gcc
|
|
|
|
export CXX=g++
|
|
|
|
|
2014-05-14 13:10:14 +02:00
|
|
|
cd $name-$version.src
|
2010-04-27 20:03:12 +02:00
|
|
|
|
2015-11-28 15:43:11 +01:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2018-07-28 14:44:40 +10:00
|
|
|
cmake .. -G Ninja \
|
|
|
|
-DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
|
|
|
|
-DLLVM_ENABLE_CXX1Y=1 \
|
2016-11-08 01:35:17 +01:00
|
|
|
-DLLVM_INCLUDE_EXAMPLES=0 \
|
|
|
|
-DLLVM_INCLUDE_TESTS=0 \
|
2017-07-09 13:33:16 +10:00
|
|
|
-DLLVM_ENABLE_FFI=1 \
|
2017-03-15 02:02:47 +01:00
|
|
|
-DLLVM_ENABLE_OCAMLDOC=0 \
|
2016-11-13 12:18:06 +01:00
|
|
|
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
|
|
|
|
-DLLVM_BUILD_LLVM_DYLIB=1 \
|
2018-12-12 10:12:16 +01:00
|
|
|
-DLLVM_LINK_LLVM_DYLIB=1 \
|
2018-07-28 14:44:40 +10:00
|
|
|
-DLLVM_INSTALL_UTILS=1 \
|
2016-11-08 01:35:17 +01:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2017-07-09 13:33:16 +10:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2017-11-17 13:09:39 -06:00
|
|
|
-DLLVM_APPEND_VC_REV=0 \
|
2018-07-28 14:44:40 +10:00
|
|
|
-Wno-dev
|
2010-04-27 20:03:12 +02:00
|
|
|
|
2018-07-28 14:44:40 +10:00
|
|
|
ninja
|
|
|
|
DESTDIR=$PKG ninja install
|
2010-04-27 20:03:12 +02:00
|
|
|
|
2016-11-08 01:35:17 +01:00
|
|
|
# multilib stub
|
2014-05-13 16:09:11 +02:00
|
|
|
mv $PKG/usr/include/llvm/Config/llvm-config{,-64}.h
|
|
|
|
install -m 0644 $SRC/llvm-config.h $PKG/usr/include/llvm/Config/
|
2010-04-27 20:03:12 +02:00
|
|
|
}
|