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
|
2017-07-09 13:33:16 +10:00
|
|
|
# Depends on: cmake libffi python
|
2010-04-27 20:03:12 +02:00
|
|
|
|
|
|
|
name=llvm
|
2018-03-28 20:31:33 +11:00
|
|
|
version=6.0.0
|
2017-03-13 23:35:41 +01:00
|
|
|
release=1
|
2017-07-09 13:33:16 +10:00
|
|
|
source=(https://llvm.org/releases/$version/$name-$version.src.tar.xz \
|
2017-03-13 23:35:41 +01: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
|
|
|
|
|
2016-11-08 01:35:17 +01:00
|
|
|
cmake -DLLVM_ENABLE_CXX1Y=1 \
|
|
|
|
-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-01-21 17:27:34 +11: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 \
|
2017-07-09 13:33:16 +10:00
|
|
|
-Wno-dev ..
|
2010-04-27 20:03:12 +02:00
|
|
|
|
2016-11-08 01:35:17 +01:00
|
|
|
MAKEFLAGS="$MAKEFLAGS" make
|
|
|
|
make DESTDIR=$PKG 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
|
|
|
}
|