aboutsummaryrefslogtreecommitdiffstats
path: root/community/lld/APKBUILD
blob: 65f32d3cf46aa81fed009b68ebdb4e9e62e9abb4 (plain) (blame)
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
50
51
52
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lld
pkgver=5.0.2
pkgrel=0
_llvmver=${pkgver%%.*}
pkgdesc="The LLVM Linker"
url="http://llvm.org"
arch="all"
license="UOI-NCSA"
makedepends="
	cmake
	libedit-dev
	llvm-dev>=$_llvmver
	llvm-static>=$_llvmver
	llvm-test-utils=>$_llvmver
	zlib-dev"
checkdepends="gtest gtest-dev"
subpackages="$pkgname-dev"
source="https://releases.llvm.org/$pkgver/$pkgname-$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"
	[ "$CARCH" = "armhf" ] && return 0
	make check-lld
}

package() {
	cd "$builddir"/build

	make install DESTDIR="$pkgdir"
}

sha512sums="6edafc277a5475a4b44fdf2d77bb8d0a80e8717f74c6db6c0208e0f1492a552f50640503ba8687bcd87a3d677b571dc4f9579b1e5c0bf53059c259ecbcc78c0e  lld-5.0.2.src.tar.xz"