1 # Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
2 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
7 pkgdesc="Linker from the LLVM project"
9 url="https://lld.llvm.org/"
10 license=('custom:Apache 2.0 with LLVM Exception')
12 makedepends=('llvm' 'cmake' 'ninja' 'python-sphinx')
13 options=('!lto') # LTO causes a couple of test failures
14 _source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
15 source=($_source_base/lld-$pkgver.src.tar.xz{,.sig}
16 $_source_base/llvm-$pkgver.src.tar.xz{,.sig}
17 $_source_base/libunwind-$pkgver.src.tar.xz{,.sig}
18 $_source_base/cmake-$pkgver.src.tar.xz{,.sig})
19 sha256sums=('dba5c70c3fe88b3a38b9180df82fbc9d1dfd55d68f41fddd6a90f9e17f8e5df9'
21 '4ad8b2cc8003c86d0078d15d987d84e3a739f24aae9033865c027abae93ee7a4'
23 '406d199ae3a16add84017f40458a5e7c31f9412937fcb518715af0a0eeafbc0c'
25 '8986f29b634fdaa9862eedda78513969fe9788301c9f2d938f4c10a3e7a3e7ea'
27 validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
28 'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta <tobias@hieta.se>
31 # https://bugs.llvm.org/show_bug.cgi?id=49228
32 mv libunwind{-$pkgver.src,}
34 mv cmake{-$pkgver.src,}
40 cd lld-$pkgver.src/build
44 -DCMAKE_BUILD_TYPE=Release
45 -DCMAKE_INSTALL_PREFIX=/usr
46 -DCMAKE_INSTALL_DOCDIR=share/doc
48 -DBUILD_SHARED_LIBS=ON
50 -DLLVM_ENABLE_SPHINX=ON
51 -DLLVM_EXTERNAL_LIT=/usr/bin/lit
52 -DLLVM_INCLUDE_TESTS=ON
53 -DLLVM_LINK_LLVM_DYLIB=ON
54 -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
55 -DSPHINX_WARNINGS_AS_ERRORS=OFF
57 cmake .. "${cmake_args[@]}"
62 cd lld-$pkgver.src/build
67 cd lld-$pkgver.src/build
69 DESTDIR="$pkgdir" ninja install
70 install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
72 # https://bugs.llvm.org/show_bug.cgi?id=42455
73 install -Dm644 -t "$pkgdir/usr/share/man/man1" ../docs/ld.lld.1
75 # Remove documentation sources
76 rm -r "$pkgdir"/usr/share/doc/lld/html/{_sources,.buildinfo}
79 # vim:set ts=2 sw=2 et: