Skip to content

Commit

Permalink
Update the Android NDK script to r25b
Browse files Browse the repository at this point in the history
Updating the Android NDK in accordance with new platform support policy.
  • Loading branch information
chriswailes committed Oct 3, 2022
1 parent b9cf2d7 commit 3dfd5ce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 30 deletions.
28 changes: 4 additions & 24 deletions ci/android-install-ndk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,7 @@
set -ex

curl --retry 5 -O \
https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
unzip -q android-ndk-r15b-linux-x86_64.zip

case "${1}" in
aarch64)
arch=arm64
;;

i686)
arch=x86
;;

*)
arch="${1}"
;;
esac;

android-ndk-r15b/build/tools/make_standalone_toolchain.py \
--unified-headers \
--install-dir "/android/ndk-${1}" \
--arch "${arch}" \
--api 24

rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
unzip -q android-ndk-r25b-linux.zip
mv android-ndk-r25b "/android/ndk-${1}"
rm -rf ./android-ndk-r25b-linux.zip
8 changes: 4 additions & 4 deletions ci/docker/x86_64-linux-android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ COPY android-sysimage.sh /android/
RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip

ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
CC_x86_64_linux_android=x86_64-linux-android-gcc \
CXX_x86_64_linux_android=x86_64-linux-android-g++ \
OBJDUMP=x86_64-linux-android-objdump \
CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android21-clang \
CC_x86_64_linux_android=x86_64-linux-android21-clang \
CXX_x86_64_linux_android=x86_64-linux-android21-clang++ \
OBJDUMP=llvm-objdump \
HOME=/tmp
6 changes: 4 additions & 2 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ case ${TARGET} in
;;
#Unoptimized build uses fast-isel which breaks with msa
mips-* | mipsel-*)
export RUSTFLAGS="${RUSTFLAGS} -C llvm-args=-fast-isel=false"
;;
export RUSTFLAGS="${RUSTFLAGS} -C llvm-args=-fast-isel=false"
;;
# Some of our test dependencies use the deprecated `gcc` crates which is
# missing a fix from https://github.com/alexcrichton/cc-rs/pull/627. Apply
# the workaround manually here.
Expand All @@ -49,6 +49,8 @@ case ${TARGET} in
riscv64*)
export TARGET_CC="riscv64-linux-gnu-gcc"
;;
*android*)
export LD="${TARGET}-clang"
esac

echo "RUSTFLAGS=${RUSTFLAGS}"
Expand Down

0 comments on commit 3dfd5ce

Please sign in to comment.