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 _source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
14 source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
15 $_source_base/llvm-$pkgver.src.tar.xz{,.sig}
16 $_source_base/libunwind-$pkgver.src.tar.xz{,.sig})
17 sha256sums=('20d1900bcd64ff62047291f6edb6ba2fed34d782675ff68713bf0c2fc9e69386'
19 '408d11708643ea826f519ff79761fcdfc12d641a2510229eec459e72f8163020'
21 '36f819091216177a61da639244eda67306ccdd904c757d70d135e273278b65e1'
23 validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
24 validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
27 # https://bugs.llvm.org/show_bug.cgi?id=49228
28 mv libunwind{-$pkgver.src,}
30 cd "$srcdir/$pkgname-$pkgver.src"
35 cd "$srcdir/$pkgname-$pkgver.src/build"
38 -DCMAKE_BUILD_TYPE=Release \
39 -DCMAKE_INSTALL_PREFIX=/usr \
40 -DLLVM_LINK_LLVM_DYLIB=ON \
41 -DLLVM_INCLUDE_TESTS=ON \
42 -DLLVM_BUILD_TESTS=ON \
43 -DLLVM_BUILD_DOCS=ON \
44 -DLLVM_ENABLE_SPHINX=ON \
45 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
46 -DLLVM_EXTERNAL_LIT=/usr/bin/lit \
47 -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
52 cd "$srcdir/$pkgname-$pkgver.src/build"
57 cd "$srcdir/$pkgname-$pkgver.src/build"
59 DESTDIR="$pkgdir" ninja install
60 install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
62 # https://bugs.llvm.org/show_bug.cgi?id=42455
63 install -Dm644 -t "$pkgdir/usr/share/man/man1" ../docs/ld.lld.1
65 # Remove documentation sources
66 rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
69 # vim:set ts=2 sw=2 et: