Skip to content

Commit 522fd18

Browse files
committed
Update the Android NDK script to r25b
Updating the Android NDK in accordance with new platform support policy.
1 parent b9cf2d7 commit 522fd18

File tree

3 files changed

+12
-30
lines changed

3 files changed

+12
-30
lines changed

ci/android-install-ndk.sh

+4-24
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,7 @@
1212
set -ex
1313

1414
curl --retry 5 -O \
15-
https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
16-
unzip -q android-ndk-r15b-linux-x86_64.zip
17-
18-
case "${1}" in
19-
aarch64)
20-
arch=arm64
21-
;;
22-
23-
i686)
24-
arch=x86
25-
;;
26-
27-
*)
28-
arch="${1}"
29-
;;
30-
esac;
31-
32-
android-ndk-r15b/build/tools/make_standalone_toolchain.py \
33-
--unified-headers \
34-
--install-dir "/android/ndk-${1}" \
35-
--arch "${arch}" \
36-
--api 24
37-
38-
rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
15+
https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
16+
unzip -q android-ndk-r25b-linux.zip
17+
mv android-ndk-r25b "/android/ndk-${1}"
18+
rm -rf ./android-ndk-r25b-linux.zip

ci/docker/x86_64-linux-android/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ COPY android-sysimage.sh /android/
2222
RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip
2323

2424
ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
25-
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
26-
CC_x86_64_linux_android=x86_64-linux-android-gcc \
27-
CXX_x86_64_linux_android=x86_64-linux-android-g++ \
28-
OBJDUMP=x86_64-linux-android-objdump \
25+
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android19-clang \
26+
CC_x86_64_linux_android=x86_64-linux-android19-clang \
27+
CXX_x86_64_linux_android=x86_64-linux-android19-clang++ \
28+
OBJDUMP=llvm-objdump \
2929
HOME=/tmp

ci/run.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ case ${TARGET} in
3535
;;
3636
#Unoptimized build uses fast-isel which breaks with msa
3737
mips-* | mipsel-*)
38-
export RUSTFLAGS="${RUSTFLAGS} -C llvm-args=-fast-isel=false"
39-
;;
38+
export RUSTFLAGS="${RUSTFLAGS} -C llvm-args=-fast-isel=false"
39+
;;
4040
# Some of our test dependencies use the deprecated `gcc` crates which is
4141
# missing a fix from https://github.com/alexcrichton/cc-rs/pull/627. Apply
4242
# the workaround manually here.
@@ -49,6 +49,8 @@ case ${TARGET} in
4949
riscv64*)
5050
export TARGET_CC="riscv64-linux-gnu-gcc"
5151
;;
52+
*android*)
53+
export LD="${TARGET}-clang"
5254
esac
5355

5456
echo "RUSTFLAGS=${RUSTFLAGS}"

0 commit comments

Comments
 (0)