@@ -39,7 +39,7 @@ qemu_x86_64="qemu-x86_64"
39
39
# be needed to compile the build script, or to compile for other targets.
40
40
if [ -n " ${ANDROID_HOME-} " ]; then
41
41
# Keep the next line in sync with the corresponding line in install-build-tools.sh.
42
- ndk_version=25.2.9519653
42
+ ndk_version=27.1.12297006
43
43
ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:- ${ANDROID_HOME} / ndk/ $ndk_version }
44
44
fi
45
45
if [ -n " ${ANDROID_NDK_ROOT-} " ]; then
@@ -67,7 +67,7 @@ case $target in
67
67
aarch64-linux-android)
68
68
export CC_aarch64_linux_android=$android_tools /aarch64-linux-android21-clang
69
69
export AR_aarch64_linux_android=$android_tools /llvm-ar
70
- export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$android_tools /aarch64-linux-android21-clang
70
+ export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$CC_aarch64_linux_android
71
71
;;
72
72
aarch64-unknown-linux-gnu)
73
73
use_clang=1
@@ -94,9 +94,13 @@ case $target in
94
94
export CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER=" $qemu_arm_gnueabihf "
95
95
;;
96
96
armv7-linux-androideabi)
97
- export CC_armv7_linux_androideabi=$android_tools /armv7a-linux-androideabi19-clang
97
+ # https://github.com/android/ndk/wiki/Changelog-r26#announcements says API
98
+ # level 21 is the minimum supported as of NDK 26, even though we'd like to
99
+ # support API level 19. Rust 1.82 is doing the same; see
100
+ # https://github.com/rust-lang/rust/commit/6ef11b81c2c02c3c4b7556d1991a98572fe9af87.
101
+ export CC_armv7_linux_androideabi=$android_tools /armv7a-linux-androideabi21-clang
98
102
export AR_armv7_linux_androideabi=$android_tools /llvm-ar
99
- export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=$android_tools /armv7a-linux-androideabi19-clang
103
+ export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=$CC_armv7_linux_androideabi
100
104
;;
101
105
armv7-unknown-linux-gnueabihf)
102
106
export CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc
0 commit comments