scripts: dev_cli.sh: respect preset RUSTFLAGS

Signed-off-by: Wei Liu <liuwe@microsoft.com>
(cherry picked from commit 9d42f48f496426cd00fe69e6f9cef1e33e741441)
This commit is contained in:
Wei Liu 2023-10-19 21:17:47 +00:00 committed by Bo Chen
parent fde74c57ad
commit 13772c5a65

View File

@ -277,10 +277,10 @@ cmd_build() {
[ $build = "release" ] && cargo_args+=("--release") [ $build = "release" ] && cargo_args+=("--release")
cargo_args+=(--target "$target") cargo_args+=(--target "$target")
rustflags="" rustflags="$RUSTFLAGS"
target_cc="" target_cc=""
if [ "$(uname -m)" = "aarch64" ] && [ "$libc" = "musl" ]; then if [ "$(uname -m)" = "aarch64" ] && [ "$libc" = "musl" ]; then
rustflags="-C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs" rustflags="$rustflags -C link-arg=-lgcc -C link_arg=-specs -C link_arg=/usr/lib/aarch64-linux-musl/musl-gcc.specs"
target_cc="musl-gcc" target_cc="musl-gcc"
fi fi