2017-10-27 20:46:27 +02:00
|
|
|
|
# Tanım: LLVM + clang derleyicisi
|
2017-12-24 00:47:53 +01:00
|
|
|
|
# URL: http://llvm.org/
|
2017-10-27 20:46:27 +02:00
|
|
|
|
# Paketçi: milisarge
|
|
|
|
|
# Gerekler: python llvm cmake
|
2017-12-24 00:47:53 +01:00
|
|
|
|
# Grup: geliştirme
|
2017-05-23 09:05:21 +02:00
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
isim=clang
|
|
|
|
|
surum=4.0.0
|
|
|
|
|
devir=1
|
2017-12-24 00:47:53 +01:00
|
|
|
|
kaynak=(http://llvm.org/releases/$surum/{llvm,cfe}-$surum.src.tar.xz\
|
|
|
|
|
llvm-config.h)
|
2017-05-23 09:05:21 +02:00
|
|
|
|
|
2017-10-27 23:59:41 +02:00
|
|
|
|
derle() {
|
2017-10-28 14:10:23 +02:00
|
|
|
|
mv cfe-$surum.src llvm-$surum.src/tools/clang
|
|
|
|
|
cd llvm-$surum.src
|
2017-05-23 09:05:21 +02:00
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake -DLLVM_ENABLE_CXX1Y=1 \
|
|
|
|
|
-DLLVM_INCLUDE_EXAMPLES=0 \
|
|
|
|
|
-DLLVM_INCLUDE_TESTS=0 \
|
|
|
|
|
-DLLVM_TARGETS_TO_BUILD='X86;AMDGPU;BPF' \
|
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr ..
|
|
|
|
|
MAKEFLAGS="$MAKEFLAGS" make
|
|
|
|
|
make DESTDIR=$PKG 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/
|
|
|
|
|
# only clang may be left, remove llvm
|
|
|
|
|
rm -r $PKG/usr/include/llvm{,-c}
|
|
|
|
|
rm -r $PKG/usr/lib/cmake/llvm
|
|
|
|
|
rm $PKG/usr/bin/{bugpoint,ll*,opt,obj2yaml,sancov,sanstats,verify-uselistorder,yaml2obj}
|
|
|
|
|
rm $PKG/usr/lib/{LLVMHello.so,BugpointPasses.so,libLTO.*,libLLVM*}
|
|
|
|
|
mv $PKG/usr/libexec/{c++-analyzer,ccc-analyzer} $PKG/usr/lib/clang
|
|
|
|
|
rm -r $PKG/usr/libexec
|
|
|
|
|
}
|