dynamically-passed target triple detection for make-rom.sh

This commit is contained in:
lif 2025-09-18 16:25:33 -07:00
parent cc19a9b118
commit 465387e9f1

View file

@ -7,6 +7,18 @@ eval $(grep '^target *=' .cargo/config.toml | head -n1 | sed 's/ //g')
# terribler
export RUSTC_BOOTSTRAP=1
next_arg=false
for arg in "$@"; do
if $next_arg; then
target="$arg"
next_arg=false
elif [ "$arg" == "--target" ]; then
next_arg=true
elif [[ "$arg" =~ ^--target= ]]; then
target="${arg/--target=/}"
fi
done
set -exo pipefail
cargo -Z build-std build --release "$@"