15 lines
490 B
Bash
Executable File
15 lines
490 B
Bash
Executable File
#!/bin/bash
|
|
# Wrapper that dispatches to `zig c++ -target x86_64-linux-musl`.
|
|
# Filters out `--target=<rust-triple>` args that cc-rs (Rust build
|
|
# scripts) adds — cc-rs emits the Rust-form triple
|
|
# (x86_64-unknown-linux-musl) which Zig can't parse. We always pass
|
|
# our own -target below, so cc-rs's is redundant.
|
|
args=()
|
|
for arg in "$@"; do
|
|
case "$arg" in
|
|
--target=*) ;;
|
|
*) args+=("$arg") ;;
|
|
esac
|
|
done
|
|
exec /opt/zig/zig c++ -target x86_64-linux-musl "${args[@]}"
|