Skip to content

Commit

Permalink
Rollback to NDK 22.1.7171670.
Browse files Browse the repository at this point in the history
This is necessary since upstream reverted compatibility to NDK <= 22: rust-lang/rust#104628.

See the discussion at rust-lang/rust#103673.
  • Loading branch information
gendx committed Jan 5, 2023
1 parent 8baf2e9 commit dd91b81
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ RUN yes | sdkmanager --licenses \
&& sdkmanager --list \
&& sdkmanager --verbose \
"build-tools;30.0.3" \
"ndk;25.1.8937393" \
"ndk;22.1.7171670" \
"platforms;android-33" \
"system-images;android-29;default;x86_64" \
&& rm -R ${HOME}/.android/
RUN sdkmanager --list_installed

RUN cd ${HOME}/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
RUN cd ${HOME}/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
&& ln -s aarch64-linux-android30-clang aarch64-linux-android-clang \
&& ln -s armv7a-linux-androideabi30-clang arm-linux-androideabi-clang \
&& ln -s i686-linux-android30-clang i686-linux-android-clang \
Expand Down Expand Up @@ -104,7 +104,7 @@ RUN avdmanager create avd \
&& mv ${HOME}/.android ${HOME}/android

# Install Rust toolchain.
ENV NDK_HOME=${ANDROID_HOME}/ndk/25.1.8937393
ENV NDK_HOME=${ANDROID_HOME}/ndk/22.1.7171670

RUN wget -nv https://sh.rustup.rs -O rustup.sh \
&& sha256sum rustup.sh \
Expand Down
8 changes: 4 additions & 4 deletions cargo-config.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[target.aarch64-linux-android]
linker = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang"
linker = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang"
runner = "/home/dev/android-runner.sh"

[target.armv7-linux-androideabi]
linker = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi30-clang"
linker = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi30-clang"
runner = "/home/dev/android-runner.sh"

[target.i686-linux-android]
linker = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android30-clang"
linker = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android30-clang"
runner = "/home/dev/android-runner.sh"

[target.x86_64-linux-android]
linker = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android30-clang"
linker = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android30-clang"
runner = "/home/dev/android-runner.sh"
8 changes: 4 additions & 4 deletions rustbuild-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ profile = "library"
changelog-seen = 2

[target.aarch64-linux-android]
android-ndk = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64"
android-ndk = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64"

[target.armv7-linux-androideabi]
android-ndk = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64"
android-ndk = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64"

[target.i686-linux-android]
android-ndk = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64"
android-ndk = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64"

[target.x86_64-linux-android]
android-ndk = "/home/dev/opt/android-sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64"
android-ndk = "/home/dev/opt/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64"

0 comments on commit dd91b81

Please sign in to comment.