aboutsummaryrefslogtreecommitdiffstats
path: root/main/compiler-rt/APKBUILD
blob: 2ed1acc73917edace5de2b77229184d0c1db891a (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 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
_vermajor=${pkgver%%.*}
pkgdesc="LLVM compiler-rt runtime libraries"
arch="all"
url="http://llvm.org/"
license="UOI-NCSA"
makedepends="
	cmake
	linux-headers
	llvm-dev>=$_vermajor
	llvm-static>=$_vermajor
	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"