File tree Expand file tree Collapse file tree 3 files changed +12
-31
lines changed
docker/x86_64-linux-android Expand file tree Collapse file tree 3 files changed +12
-31
lines changed Original file line number Diff line number Diff line change 1212set -ex
1313
1414curl --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
Original file line number Diff line number Diff line change @@ -21,9 +21,8 @@ RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
2121COPY android-sysimage.sh /android/
2222RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip
2323
24- 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 \
24+ ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
25+ CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android21-clang \
26+ CC_x86_64_linux_android=x86_64-linux-android21-clang \
27+ CXX_x86_64_linux_android=x86_64-linux-android21-clang++ \
2928 HOME=/tmp
Original file line number Diff line number Diff 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"
5254esac
5355
5456echo " RUSTFLAGS=${RUSTFLAGS} "
You can’t perform that action at this time.
0 commit comments