2014-05-14 13:10:14 +02:00
|
|
|
# Description: LLVM compiler backend
|
2020-07-06 16:13:33 +02:00
|
|
|
# URL: https://llvm.org/
|
2012-07-05 16:19:11 +02:00
|
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
2020-07-06 16:13:33 +02:00
|
|
|
# Depends on: cmake libxml2 ninja
|
2010-04-27 20:03:12 +02:00
|
|
|
|
|
|
|
name=llvm
|
2020-07-22 11:34:41 +02:00
|
|
|
version=10.0.1
|
2019-05-23 23:28:51 +02:00
|
|
|
release=1
|
2020-07-06 16:13:33 +02:00
|
|
|
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz
|
|
|
|
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++
|
|
|
|
|
2020-07-22 11:34:41 +02:00
|
|
|
cmake -S $name-$version.src -B build -G Ninja \
|
2020-07-06 16:13:33 +02:00
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
|
|
|
|
-DLLVM_BUILD_LLVM_DYLIB=1 \
|
|
|
|
-DLLVM_LINK_LLVM_DYLIB=1 \
|
|
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
2018-07-28 14:44:40 +10:00
|
|
|
-DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-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 \
|
2019-03-16 13:35:00 +01:00
|
|
|
-DLLVM_ENABLE_RTTI=1 \
|
2017-03-15 02:02:47 +01:00
|
|
|
-DLLVM_ENABLE_OCAMLDOC=0 \
|
2018-07-28 14:44:40 +10:00
|
|
|
-DLLVM_INSTALL_UTILS=1 \
|
|
|
|
-Wno-dev
|
2010-04-27 20:03:12 +02:00
|
|
|
|
2020-07-22 11:34:41 +02:00
|
|
|
ninja -C build
|
|
|
|
DESTDIR=$PKG ninja -C build 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
|
|
|
}
|