aboutsummaryrefslogtreecommitdiffstats
path: root/community/lld/APKBUILD
blob: 52ed78ae2400d8704f9d01ecd6ad3455cb574c68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lld
pkgver=4.0.0
pkgrel=0
_vermajor=${pkgver%%.*}
pkgdesc="The LLVM Linker"
url="http://llvm.org"
arch="all"
license="UOI-NCSA"
makedepends="
	cmake
	llvm-dev>=$_vermajor
	llvm-static>=$_vermajor
	zlib-dev"
subpackages="$pkgname-dev"
source="http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz
	cmake-fix-pthread-handling-for-out-of-tree-builds.patch"
builddir="$srcdir/$pkgname-$pkgver.src"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build

	cmake .. \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_VERBOSE_MAKEFILE=OFF \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DCMAKE_SKIP_INSTALL_RPATH=ON \
		-DLLVM_LINK_LLVM_DYLIB=ON
	make
}

check() {
	cd "$builddir"

	./build/bin/ld.lld --version
}

package() {
	cd "$builddir"/build

	make install DESTDIR="$pkgdir"
}

sha512sums="66b2c9cc57f5e94ad7e7da1b1bcc08cbbaee1b55c6efa64b2424b9d8776c70b842c2a31c188a99b447be6a8621ad1b1e70573bbfcf5d6b1aa986b03b3b3350f3  lld-4.0.0.src.tar.xz
2aa44973dd86aaddbd5b21789bb5e2a611d00558c41ebd078c2b7d1a3eb5c303db69084f50517b14e77674c46148ecae6bde1b037d8ba5269a342fba84116a9b  cmake-fix-pthread-handling-for-out-of-tree-builds.patch"