Skip to content

Commit 93acd1b

Browse files
committed
Update Android testing to API 21, matching NDK 26
We were running testing on API 18, which was already out of support for NDK 25, and some of the ancient behavior in that image was causing trouble when developing `rustc` features (rust-lang#120326). We'll be updating to NDK 26 (latest LTS) shortly, so rather than updating to API 19, then again to API 21 in a bit, just jump straight to 21. Fixes: rust-lang#120567
1 parent 6a92312 commit 93acd1b

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ jobs:
204204
- self-hosted
205205
- ARM64
206206
- linux
207-
- name: arm-android
207+
- name: aarch64-android
208208
os: ubuntu-20.04-8core-32gb
209209
env: {}
210210
- name: armhf-gnu

src/bootstrap/src/utils/cc_detect.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,8 @@ pub(crate) fn ndk_compiler(compiler: Language, triple: &str, ndk: &Path) -> Path
239239
triple.to_string()
240240
};
241241

242-
// API 19 is the earliest API level supported by NDK r25b but AArch64 and x86_64 support
243-
// begins at API level 21.
244-
let api_level =
245-
if triple.contains("aarch64") || triple.contains("x86_64") { "21" } else { "19" };
242+
// The earliest API supported by NDK r26b is 21.
243+
let api_level = "21";
246244
let compiler = format!("{}{}-{}", triple_translated, api_level, compiler.clang());
247245
let host_tag = if cfg!(target_os = "macos") {
248246
// The NDK uses universal binaries, so this is correct even on ARM.

src/ci/docker/host-x86_64/arm-android/Dockerfile renamed to src/ci/docker/host-x86_64/aarch64-android/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN dpkg --add-architecture i386 && \
2121

2222
COPY scripts/android-sdk.sh /scripts/
2323
COPY scripts/android-sdk-manager.py /scripts/
24-
COPY host-x86_64/arm-android/android-sdk.lock /android/sdk/android-sdk.lock
24+
COPY host-x86_64/aarch64-android/android-sdk.lock /android/sdk/android-sdk.lock
2525
RUN /scripts/android-sdk.sh
2626

2727
ENV PATH=$PATH:/android/sdk/emulator
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
emulator emulator-linux_x64-11237101.zip 0fd36dd5a7be6ee8770776a95c2933541d9243f3
2+
patcher;v4 3534162-studio.sdk-patcher.zip 046699c5e2716ae11d77e0bad814f7f33fab261e
3+
platform-tools platform-tools_r34.0.5-linux.zip 96097475cf7b279fdd8f218f5d043ffe94104ec3
4+
platforms;android-21 android-21_r02.zip 53536556059bb29ae82f414fd2e14bc335a4eb4c
5+
system-images;android-21;default;arm64-v8a sys-img/android/arm64-v8a-21_r04.zip c4375f1b4b4cd21a8617660e25f621cedcbd8332
6+
tools sdk-tools-linux-4333796.zip 8c7c28554a32318461802c1291d76fccfafde054

src/ci/docker/host-x86_64/arm-android/android-sdk.lock

-6
This file was deleted.

src/ci/github-actions/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ jobs:
381381
- name: aarch64-gnu
382382
<<: *job-aarch64-linux
383383

384-
- name: arm-android
384+
- name: aarch64-android
385385
<<: *job-linux-8c
386386

387387
- name: armhf-gnu

0 commit comments

Comments
 (0)