clang.paketlendi
This commit is contained in:
parent
7395c6a055
commit
fa6bbdf8eb
3 changed files with 67 additions and 0 deletions
12
talimatname/genel/clang/config.h
Normal file
12
talimatname/genel/clang/config.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* config.h stub */
|
||||||
|
|
||||||
|
#ifndef __STUB__CONFIG_H__
|
||||||
|
#define __STUB__CONFIG_H__
|
||||||
|
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
#include "config-64.h"
|
||||||
|
#else
|
||||||
|
#include "config-32.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
12
talimatname/genel/clang/llvm-config.h
Normal file
12
talimatname/genel/clang/llvm-config.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
/* llvm-config.h stub */
|
||||||
|
|
||||||
|
#ifndef __STUB__LLVMCONFIG_H__
|
||||||
|
#define __STUB__LLVMCONFIG_H__
|
||||||
|
|
||||||
|
#if defined(__x86_64__)
|
||||||
|
#include "llvm-config-64.h"
|
||||||
|
#else
|
||||||
|
#include "llvm-config-32.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
43
talimatname/genel/clang/talimat
Normal file
43
talimatname/genel/clang/talimat
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Description: LLVM + clang derleyicisi
|
||||||
|
# URL: http://llvm.org/
|
||||||
|
# Packager: milisarge
|
||||||
|
# Depends on: python llvm cmake
|
||||||
|
|
||||||
|
name=clang
|
||||||
|
version=4.0.0
|
||||||
|
release=1
|
||||||
|
source=(http://llvm.org/releases/$version/{llvm,cfe}-$version.src.tar.xz \
|
||||||
|
llvm-config.h)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
mv cfe-$version.src llvm-$version.src/tools/clang
|
||||||
|
|
||||||
|
cd llvm-$version.src
|
||||||
|
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
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue