aboutsummaryrefslogtreecommitdiffstats
path: root/main/compiler-rt/APKBUILD
blob: dcdb5d5224c3995c85c221c5d0e4c04f18fab5bd (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
# Contributor Travis Tilley <ttilley@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=compiler-rt
# Note: Update together with llvm.
pkgver=4.0.0
pkgrel=0
pkgdesc="LLVM compiler-rt runtime libraries"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
makedepends="cmake linux-headers llvm-dev llvm-static python2"
source="http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz"
builddir="$srcdir/$pkgname-$pkgver.src"

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

	cmake .. \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
		-DCOMPILER_RT_BUILD_XRAY=OFF \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"/build

	make DESTDIR="$pkgdir" install || return 1

	cd "$pkgdir"

	mkdir -p usr/lib/clang
	case "$CARCH" in
		ppc64le | s390x) ;;
		*) mv usr/lib/linux usr/lib/clang/$pkgver;;
	esac
}

sha512sums="ed52436a2399ca82c1af46a523e89e88c23367f74cd110f0267af49a72aa4912ae8f48c6093e6b01c9ea68c48354a12201d26baf721d254fb017ddb98af2e3dd  compiler-rt-4.0.0.src.tar.xz"