Commit | Line | Data |
---|---|---|
d84197c7 VM |
1 | # Description: LLVM compiler backend |
2 | # URL: http://llvm.org/ | |
3 | # Maintainer: Thomas Penteker, tek at serverop dot de | |
4 | # Depends on: cmake libffi libxml2 ninja | |
5 | ||
6 | name=llvm | |
57aa92a6 | 7 | version=9.0.1 |
d84197c7 VM |
8 | release=1 |
9 | source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/$name-$version.src.tar.xz) | |
10 | ||
11 | build() { | |
12 | export CC=gcc | |
13 | export CXX=g++ | |
14 | ||
15 | cd $name-$version.src | |
16 | ||
17 | mkdir build | |
18 | cd build | |
19 | ||
20 | cmake .. -G Ninja \ | |
21 | -DLLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \ | |
22 | -DLLVM_ENABLE_CXX1Y=1 \ | |
23 | -DLLVM_INCLUDE_EXAMPLES=0 \ | |
24 | -DLLVM_INCLUDE_TESTS=0 \ | |
25 | -DLLVM_ENABLE_FFI=1 \ | |
26 | -DLLVM_ENABLE_RTTI=1 \ | |
27 | -DLLVM_ENABLE_OCAMLDOC=0 \ | |
b0313a42 | 28 | -DLLVM_TARGETS_TO_BUILD='ARM' \ |
d84197c7 VM |
29 | -DLLVM_BUILD_LLVM_DYLIB=1 \ |
30 | -DLLVM_LINK_LLVM_DYLIB=1 \ | |
31 | -DLLVM_INSTALL_UTILS=1 \ | |
32 | -DCMAKE_BUILD_TYPE=Release \ | |
33 | -DCMAKE_INSTALL_PREFIX=/usr \ | |
34 | -DLLVM_APPEND_VC_REV=0 \ | |
35 | -Wno-dev | |
36 | ||
37 | ninja | |
38 | DESTDIR=$PKG ninja install | |
39 | } |