-
Notifications
You must be signed in to change notification settings - Fork 2
/
06-libcxx.sh
executable file
·37 lines (33 loc) · 1.04 KB
/
06-libcxx.sh
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
#!/bin/sh -e
[ -f "$REPO_ROOT/.libcxx" ] && exit 0
cd "$BUILD"
mkdir -p libcxx
cd libcxx
cmake -G Ninja "$SOURCES/llvm-$LLVM_VER/runtimes" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLIBCXXABI_USE_LLVM_UNWINDER=YES \
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=YES \
-DLIBCXX_HAS_ATOMIC_LIB=OFF \
-DLIBCXX_HAS_MUSL_LIBC=ON \
-DLIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY=YES \
-DLIBUNWIND_USE_COMPILER_RT=ON \
-DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY=YES \
-DLIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY=YES \
-DLIBCXX_ENABLE_STATIC=OFF \
-DLIBCXX_ENABLE_SHARED=ON \
-DLIBCXXABI_ENABLE_SHARED=OFF \
-DLIBCXXABI_ENABLE_STATIC=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER_TARGET=$TARGET \
-DCMAKE_CXX_COMPILER_TARGET=$TARGET \
-DCMAKE_ASM_COMPILER_TARGET=$TARGET \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_ASM_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_SYSROOT=$SYSROOT \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_COMPILER_WORKS=1
samu
DESTDIR=$SYSROOT samu install
touch $REPO_ROOT/.libcxx