BizHawk/waterbox/libcxx/configure-for-waterbox-phase-0

20 lines
894 B
Bash

#!/bin/sh
MYPATH="`dirname \"$0\"`"
SYSROOT="`realpath \"$MYPATH/../sysroot\"`"
LLVMDIR="`realpath \"$MYPATH/../../../llvm-project\"`"
rm -rf build0
mkdir build0
cd build0
export CFLAGS="-mabi=ms -mcmodel=large -mstack-protector-guard=global -fno-use-cxa-atexit -no-pie -fno-pic -fno-pie -D_WIN64 -D_LIBUNWIND_IS_BAREMETAL -D_LIBUNWIND_SUPPORT_DWARF_UNWIND"
export CXXFLAGS="-mabi=ms -mcmodel=large -mstack-protector-guard=global -fno-use-cxa-atexit -no-pie -fno-pic -fno-pie -D_WIN64 -D_LIBUNWIND_IS_BAREMETAL -D_LIBUNWIND_SUPPORT_DWARF_UNWIND"
cmake \
-DCMAKE_C_COMPILER="$SYSROOT/bin/musl-gcc" \
-DCMAKE_CXX_COMPILER="$SYSROOT/bin/musl-gcc" \
-DLIBUNWIND_ENABLE_SHARED=OFF \
-DLIBUNWIND_ENABLE_THREADS=OFF \
-DLIBUNWIND_USE_COMPILER_RT=ON \
-DCMAKE_INSTALL_PREFIX="$SYSROOT" \
-DCMAKE_AR="/usr/bin/gcc-ar" \
-DCMAKE_RANLIB="/usr/bin/gcc-ranlib" \
../../../../llvm-project/libunwind