dynamically-passed target triple detection for make-rom.sh
This commit is contained in:
parent
cc19a9b118
commit
465387e9f1
1 changed files with 12 additions and 0 deletions
12
make-rom.sh
12
make-rom.sh
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in a new issue