Files
wehub-resource-sync 680845cb1c
Build containerization / Verify commit signatures (push) Has been skipped
Build containerization / containerization (push) Successful in 0s
Linux build / Linux compile check (push) Has been cancelled
Linux build / Determine Swift version (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:25:30 +08:00

25 lines
731 B
Bash
Executable File

#!/bin/bash
# Wrapper that dispatches to `zig c++ -target x86_64-linux-gnu.2.35`.
# Mirrors x86_64-linux-musl-g++ but pins a glibc 2.35 baseline.
#
# See x86_64-linux-gnu-gcc for the rationale behind intercepting
# `-print-prog-name=ld`.
case " $* " in
*" -print-prog-name=ld "*)
echo /usr/local/bin/x86_64-linux-gnu-ld
exit 0
;;
esac
# Filters out `--target=<rust-triple>` args that cc-rs adds — cc-rs
# emits the Rust-form triple (x86_64-unknown-linux-gnu) which Zig
# can't parse. We always pass our own -target below.
args=()
for arg in "$@"; do
case "$arg" in
--target=*) ;;
*) args+=("$arg") ;;
esac
done
exec /opt/zig/zig c++ -target x86_64-linux-gnu.2.35 "${args[@]}"