# Contributor: Eric Molitor # Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=lld pkgver=8.0.1 pkgrel=0 _llvmver=${pkgver%%.*} pkgdesc="The LLVM Linker" url="https://llvm.org" arch="all" license="NCSA" makedepends=" cmake libedit-dev llvm-dev>=$_llvmver llvm-static>=$_llvmver llvm-test-utils=>$_llvmver zlib-dev" checkdepends="gtest gtest-dev bash" subpackages="$pkgname-static $pkgname-dev" source="https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/lld-$pkgver.src.tar.xz" builddir="$srcdir/$pkgname-$pkgver.src" build() { mkdir -p "$builddir"/build cd "$builddir"/build cmake .. \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \ -DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS -fpermissive" \ -DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DLLVM_INCLUDE_TESTS=ON make } check() { cd "$builddir/build" # ELF/eh-frame-hdr-augmentation.s is broken on armhf & armv7 case "$CARCH" in armhf|armv7) rm ../test/ELF/eh-frame-hdr-augmentation.s;; esac # make check-lld doesn't like using system lit lit -sv \ --param lld_site_config=$builddir/build/test/lit.site.cfg \ --param lld_unit_site_config=$builddir/build/test/Unit/lit.site.cfg \ $builddir/build/test } package() { cd "$builddir"/build make install DESTDIR="$pkgdir" } sha512sums="646418d4a4ce922d1a69e9bf2e472f5d758f25ec21b80a2c66dfe5effc59c9c312fb167cf64ee2d8a2ced986e7474ed3d2996a38be66fbf63c574229d28e0900 lld-8.0.1.src.tar.xz"