Split base/llvm package into base/llvm,clang,lld Updated base buildlist Discarded old heavybuilds/firefox patch
72 lines
2.2 KiB
Bash
72 lines
2.2 KiB
Bash
# Maintainer: PktSurf <smlinux@pktsurf.in>
|
|
app=llvm
|
|
version=17.0.6
|
|
build=1sml
|
|
homepage="http://llvm.org/"
|
|
download="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz"
|
|
desc="LLVM compiler toolkit"
|
|
requires="libffi libxml2 perl cmake"
|
|
preservestaticlibs=1
|
|
|
|
prepbuilddir() {
|
|
mkandenterbuilddir
|
|
rm -rf $app-project-$version.src
|
|
# In case the user decides to resume an incomplete build
|
|
[[ -d cmake ]] && rm -r cmake
|
|
|
|
tar xf $srcdir/$app-project-$version.src.tar.?z*
|
|
cd $app-project-$version.src
|
|
fixbuilddirpermissions
|
|
|
|
applypatch $srcdir/install-prefix.patch
|
|
applypatch $srcdir/llvm-stack-size.patch
|
|
}
|
|
|
|
build() {
|
|
unset CFLAGS CXXFLAGS
|
|
|
|
buildtargets="X86;AMDGPU;BPF"
|
|
|
|
mkdir -p build
|
|
cmake -B build -G Ninja -Wno-dev -S llvm \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DLLVM_BUILD_DOCS=OFF \
|
|
-DLLVM_BUILD_EXAMPLES=OFF \
|
|
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
|
-DLLVM_BUILD_TESTS=OFF \
|
|
-DLLVM_INCLUDE_TESTS=OFF \
|
|
-DLLVM_ENABLE_FFI=ON \
|
|
-DLLVM_ENABLE_RTTI=ON \
|
|
-DLLVM_ENABLE_LIBEDIT=OFF \
|
|
-DLLVM_INSTALL_UTILS=ON \
|
|
-DLLVM_TARGETS_TO_BUILD="$buildtargets" \
|
|
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
|
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
|
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
|
-DLLVM_ENABLE_ZSTD=ON \
|
|
-DLLVM_ENABLE_ZLIB=ON \
|
|
-DLLVM_ENABLE_DUMP=ON \
|
|
-DLLVM_BUILD_TESTS=OFF \
|
|
-DLLVM_ENABLE_LIBCXX=OFF \
|
|
-DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
|
|
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-pc-linux-musl" \
|
|
-DLLVM_HOST_TRIPLE="x86_64-pc-linux-musl"
|
|
|
|
cmake --build build
|
|
python3 llvm/utils/lit/setup.py build
|
|
|
|
DESTDIR="$pkg" cmake --install build
|
|
python3 llvm/utils/lit/setup.py install --root="$pkg"
|
|
|
|
cp LICENSE.TXT $pkgdocs/
|
|
|
|
mkfinalpkg
|
|
}
|
|
|
|
sha512sums="
|
|
f369236cc5b96283ce9251b0abdc6b320f0d651182547622a8116df29a7540f6f818f3a20917e02b6afc1bc68a1e142d3c0abb87dc3d7df72308a646e6facc80 llvm-project-17.0.6.src.tar.lz
|
|
ebc0be314c129ef38f00c8c2be9d589658cae89ac8cda109e35933b5044e775a3d370c0c584d3e501e4d43167b8523d8c5e5a85653d8ebe853571697ae40fb35 install-prefix.patch
|
|
2123f01d8075a15cf8c2d8091fc8c92cb99807b1d654af13b436690ddb55f3e893a494593b3c92aeab26e50db4e0500ac688129ab6bc11e4765c0308b90db101 llvm-stack-size.patch
|
|
"
|