22 lines
617 B
Bash
22 lines
617 B
Bash
#!/bin/sh
|
|
|
|
set -x
|
|
set -e
|
|
|
|
pacman --noconfirm --needed -S git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-llvm
|
|
|
|
git config core.abbrev 9
|
|
|
|
ZIGBUILDDIR="$(pwd)/build"
|
|
PREFIX="$ZIGBUILDDIR/dist"
|
|
CMAKEFLAGS="-DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX -DZIG_STATIC=ON"
|
|
|
|
mkdir $ZIGBUILDDIR
|
|
cd $ZIGBUILDDIR
|
|
|
|
cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo $CMAKEFLAGS -DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=lld -Wl,/debug,/pdb:zig.pdb'
|
|
|
|
make -j$(nproc) install
|
|
|
|
./zig build test-behavior -Dskip-non-native -Dskip-release
|