#!/bin/sh
export HOME="${HOME:-/home/fleeky}"
# Filter flags that conflict with zig's explicit -target
args=""
for arg in "$@"; do
case "$arg" in
-march=x86-64|-m64|-fno-gnu-unique) ;; # filtered: zig doesn't support these
*) args="$args $arg" ;;
esac
done
# -isystem for host third-party headers (libuv, libsodium)
# -L for host library path (zig cross-linker doesn't search system paths)
exec zig cc -target x86_64-linux-gnu.2.28 -isystem /usr/include -L/usr/lib/x86_64-linux-gnu $args