#!/bin/sh # The C compiler cargo's C dependencies (libdeflate) get when packwand's build.zig builds Packopt: # `zig cc` for $PACKOPT_ZIG_TARGET, so every packwand target cross-compiles with no other toolchain. # The cc crate adds `--target=`, which zig can't parse; the Zig triple replaces it. for argument do shift case $argument in --target=*) ;; *) set -- "$@" "$argument" ;; esac done # No `-mevex512` for libdeflate's AVX-512 functions: Zig 0.17's clang (LLVM 22) no longer has the # option, and AVX-512 there already includes 512-bit vectors. exec "$PACKOPT_ZIG" cc -target "$PACKOPT_ZIG_TARGET" "$@"