[arch-commits] Commit in (llvm9 llvm9/repos llvm9/trunk llvm9/trunk/PKGBUILD)
Evangelos Foutras
foutrelis at archlinux.org
Mon Apr 13 02:00:20 UTC 2020
Date: Monday, April 13, 2020 @ 02:00:20
Author: foutrelis
Revision: 380257
Add llvm9 for bootstrapping the rust/ldc rebuilds
Added:
llvm9/
llvm9/repos/
llvm9/trunk/
llvm9/trunk/PKGBUILD
----------+
PKGBUILD | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
Added: llvm9/trunk/PKGBUILD
===================================================================
--- llvm9/trunk/PKGBUILD (rev 0)
+++ llvm9/trunk/PKGBUILD 2020-04-13 02:00:20 UTC (rev 380257)
@@ -0,0 +1,83 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+
+pkgname=('llvm9' 'llvm9-libs')
+pkgver=9.0.1
+pkgrel=1
+arch=('x86_64')
+url="https://llvm.org/"
+license=('custom:Apache 2.0 with LLVM Exception')
+makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
+ 'python-setuptools')
+options=('staticlibs')
+_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
+source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig})
+sha256sums=('00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a'
+ 'SKIP')
+validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
+validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
+
+prepare() {
+ cd "$srcdir/llvm-$pkgver.src"
+ mkdir build
+}
+
+build() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ cmake .. -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLLVM_HOST_TRIPLE=$CHOST \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_BINUTILS_INCDIR=/usr/include
+ ninja
+}
+
+check() {
+ cd "$srcdir/llvm-$pkgver.src/build"
+ ninja check
+}
+
+package_llvm9() {
+ pkgdesc="Collection of modular and reusable compiler and toolchain technologies"
+ depends=('llvm9-libs' 'perl')
+ optdepends=('python-setuptools: for using lit (LLVM Integrated Tester)')
+ conflicts=('llvm')
+
+ cd "$srcdir/llvm-$pkgver.src/build"
+
+ DESTDIR="$pkgdir" ninja install
+
+ # Include lit for running lit-based tests in other projects
+ pushd ../utils/lit
+ python3 setup.py install --root="$pkgdir" -O1
+ popd
+
+ # The runtime libraries go into llvm9-libs
+ mv -f "$pkgdir"/usr/lib/lib{LLVM-*.so,{LTO,Remarks}.so.*} "$srcdir"
+
+ # Remove files which conflict with llvm-libs
+ rm "$pkgdir"/usr/lib/{LLVMgold,lib{LLVM,LTO,Remarks}}.so
+
+ install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_llvm9-libs() {
+ pkgdesc="LLVM 9 runtime libraries"
+ depends=('gcc-libs' 'zlib' 'libffi' 'libedit' 'ncurses' 'libxml2')
+
+ install -d "$pkgdir/usr/lib"
+ cp -P "$srcdir"/lib{LLVM-*.so,{LTO,Remarks}.so.*} "$pkgdir/usr/lib/"
+
+ install -Dm644 "$srcdir/llvm-$pkgver.src/LICENSE.TXT" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list