2024-01-02 11:29:13 +00:00
|
|
|
#!@shell@
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
defaultSysroot=(@sysroot@)
|
|
|
|
|
|
|
|
for arg; do
|
|
|
|
case "$arg" in
|
|
|
|
--sysroot)
|
|
|
|
defaultSysroot=()
|
|
|
|
;;
|
|
|
|
--)
|
|
|
|
break
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
extraBefore=("${defaultSysroot[@]}")
|
2024-01-02 11:29:13 +00:00
|
|
|
extraAfter=($NIX_RUSTFLAGS)
|
|
|
|
|
|
|
|
# Optionally print debug info.
|
|
|
|
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
|
|
|
echo "extra flags before to @prog@:" >&2
|
|
|
|
printf " %q\n" "${extraBefore[@]}" >&2
|
|
|
|
echo "original flags to @prog@:" >&2
|
|
|
|
printf " %q\n" "$@" >&2
|
|
|
|
echo "extra flags after to @prog@:" >&2
|
|
|
|
printf " %q\n" "${extraAfter[@]}" >&2
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec @prog@ "${extraBefore[@]}" "$@" "${extraAfter[@]}"
|