summaryrefslogtreecommitdiff
path: root/repo/devel/llvm/llvm.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /repo/devel/llvm/llvm.xibuild
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'repo/devel/llvm/llvm.xibuild')
-rw-r--r--repo/devel/llvm/llvm.xibuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/repo/devel/llvm/llvm.xibuild b/repo/devel/llvm/llvm.xibuild
new file mode 100644
index 0000000..f1eaf13
--- /dev/null
+++ b/repo/devel/llvm/llvm.xibuild
@@ -0,0 +1,54 @@
+#!/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_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLLVM_BINUTILS_INCDIR=/usr/include \
+ -DLLVM_BUILD_DOCS=OFF \
+ -DLLVM_BUILD_EXAMPLES=OFF \
+ -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-linux-musl" \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_ENABLE_LIBCXX=OFF \
+ -DLLVM_ENABLE_PIC=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_SPHINX=OFF \
+ -DLLVM_ENABLE_TERMINFO=ON \
+ -DLLVM_ENABLE_ZLIB=ON \
+ -DLLVM_HOST_TRIPLE="x86_64-linux-musl" \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_APPEND_VC_REV=OFF \
+ -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
+}