Skip to content

Commit 1959b6b

Browse files
committed
Use REALLY_PIN_CC for Android builds as well
1 parent 4ea4b7b commit 1959b6b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

genbindings.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,13 @@ for IDX in ${!EXTRA_TARGETS[@]}; do
620620
;;
621621
esac
622622
[ "${EXTRA_LINK_LTO[$IDX]}" != "" ] && EXTRA_RUSTFLAGS="-C linker-plugin-lto"
623-
RUSTC_BOOTSTRAP=1 RUSTFLAGS="$BASE_RUSTFLAGS -C embed-bitcode=yes -C lto -C linker=${EXTRA_CCS[$IDX]} $EXTRA_RUSTFLAGS" CARGO_PROFILE_RELEASE_LTO=true cargo build $CARGO_BUILD_ARGS -v --release --target "${EXTRA_TARGETS[$IDX]}" -Zbuild-std=std,panic_abort
623+
624+
# At some point rustc fixed the issue which merits REALLY_PIN_CC. I'm not sure when,
625+
# however, so we just use 1.84 as the cutoff.
626+
[ "$RUSTC_MINOR_VERSION" -lt 84 ] && REALLY_PIN_CC
627+
[ "$RUSTC_MINOR_VERSION" -lt 84 ] && OFFLINE_OPT="--offline"
628+
629+
RUSTC_BOOTSTRAP=1 RUSTFLAGS="$BASE_RUSTFLAGS -C embed-bitcode=yes -C lto -C linker=${EXTRA_CCS[$IDX]} $EXTRA_RUSTFLAGS" CARGO_PROFILE_RELEASE_LTO=true cargo build $OFFLINE_OPT $CARGO_BUILD_ARGS -v --release --target "${EXTRA_TARGETS[$IDX]}" -Zbuild-std=std,panic_abort
624630
done
625631

626632
if [ "$CLANGPP" != "" -a "$LLD" != "" ]; then

0 commit comments

Comments
 (0)