summaryrefslogtreecommitdiff
path: root/repo/devel/compiler-rt.xibuild
blob: abff3dcd831e71cb7d09de10fa4fd5ec850227c3 (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
#!/bin/sh

NAME="compiler-rt"
DESC="LLVM compiler-rt runtime libraries"

MAKEDEPS="cmake libexecinfo"
DEPS="musl "

PKG_VER=13.0.0
SOURCE="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz"
ADDITIONAL="link-execinfo.patch "

prepare () {
    apply_patches
}

build () {
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DBUILD_SHARED_LIBS=True \
        -DBUILD_STATIC_LIBS=OFF \
		-DCMAKE_C_COMPILER=clang \
		-DCMAKE_CXX_COMPILER=clang++ \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCOMPILER_RT_INCLUDE_TESTS=OFF \
		-DCOMPILER_RT_BUILD_SANITIZERS=ON \
		-DCOMPILER_RT_BUILD_XRAY=ON \
		-DCOMPILER_RT_INSTALL_PATH="/usr/lib/clang/$PKG_VER" \
		-DLLVM_EXTERNAL_LIT="/usr/bin/lit" \

	cmake --build build
}

package () {
	DESTDIR="$PKG_DEST" cmake --install build
}