Skip to content

Instantly share code, notes, and snippets.

@matu3ba
Last active November 28, 2022 21:37
Show Gist options
  • Save matu3ba/5aa6e4e5464378b1d83d8a8d737a796d to your computer and use it in GitHub Desktop.
Save matu3ba/5aa6e4e5464378b1d83d8a8d737a796d to your computer and use it in GitHub Desktop.
zig windows git
#!/usr/bin/env sh
# fetch build run: zig compiler on windows for git bash
# https://github.com/ziglang/zig/blob/master/ci/windows/build.ps1
cd
cd Desktop
# f
VERSION="0.11.0-dev.25+499dddb4c"
curl -o devkit.zip https://ziglang.org/deps/zig+llvm+lld+clang-x86_64-windows-gnu-$VERSION.zip
unzip devkit.zip
mv zig+llvm+lld+clang-x86_64-windows-gnu-$VERSION devkit
# b (for simplicity add aliases to ~/.bashrc)
DEVKIT=$HOME/Desktop/devkit
PATH=$PATH:$HOME/Desktop/devkit/bin
# in zig repo:
$DEVKIT/bin/zig.exe build -p stage3 --search-prefix $DEVKIT --zig-lib-dir lib -Denable-stage1 -Dstatic-llvm -Duse-zig-libcxx -Dtarget=x86_64-windows-gnu
# r
stage3/bin/zig.exe build test-standalone -Dtest-filter=childprocess_extrapipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment