blob: aa18732aff428133c57eb625689d6a799ca62e2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/sh
MAKEDEPS="make ninja cmake libedit libffi libxml2 ncurses python-setuptools python-sphinx"
DEPS="perl zlib libffi libedit ncurses"
PKG_VER=13.0.0
SOURCE=https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/llvm-$PKG_VER.src.tar.xz
DESC="Collection of modular and reusable compiler and toolchain technologies"
package () {
grep -rl '#!.*python' | xargs sed -i '1s/python$/python3/'
}
build () {
mkdir build
cd build
CC=gcc CXX=g++ \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLLVM_ENABLE_FFI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_TARGETS_TO_BUILD="host;AMDGPU;BPF" \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_ENABLE_TERMINFO=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-Wno-dev -G Ninja .. &&
ninja llvm-tblgen &&
ninja &&
cd ..
python3 utils/lit/setup.py build
}
package () {
DESTDIR=$PKG_DEST ninja -C build install
cd build
python3 ../utils/lit/setup.py install --prefix=/usr --root=$PKG_DEST
}
|