[libcxx-commits] [libcxx] [libc++][Android] Update compiler and sysroot (PR #148998)
Ryan Prichard via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 16 13:22:07 PDT 2025
https://github.com/rprichard updated https://github.com/llvm/llvm-project/pull/148998
>From ca6a51547ea913448558ca3d12ae66ae4bbab50a Mon Sep 17 00:00:00 2001
From: Ryan Prichard <rprichard at google.com>
Date: Tue, 15 Jul 2025 16:52:27 -0700
Subject: [PATCH 1/2] [libc++][Android] Update compiler and sysroot
* Upgrade from r536225 to r563880.
* Upgrade from ab/12644632 to
f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f, the current HEAD commit of
https://android.googlesource.com/platform/prebuilts/ndk/+/refs/heads/mirror-goog-main-ndk
The previous source of sysroots (ci.android.com), deleted its artifacts
after a short period of time, and is currently out-of-date because of
the aosp-main turndown.
Updating the Docker image also fixes two tests.
---
.../meta.unary.comp/is_bounded_array.pass.cpp | 3 ---
...ue_object_representations.compile.pass.cpp | 3 ---
libcxx/utils/ci/Dockerfile | 21 +++++++++----------
libcxx/utils/ci/docker-compose.yml | 6 +++---
4 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
index 09086a4c046d6..8e57e8913dcbe 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
@@ -7,9 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// The Clang version that Android currently uses in the CI is too old.
-// XFAIL: LIBCXX-ANDROID-FIXME
-
// type_traits
// is_bounded_array<T>
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
index 9aac871f2633f..bd7da40daf2bc 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
@@ -8,9 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14
-// The Clang version that Android currently uses in the CI is too old.
-// XFAIL: LIBCXX-ANDROID-FIXME
-
// type_traits
// has_unique_object_representations
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile
index 0a1985b02807b..63ceceaa67635 100644
--- a/libcxx/utils/ci/Dockerfile
+++ b/libcxx/utils/ci/Dockerfile
@@ -184,7 +184,7 @@ FROM ubuntu:jammy AS android-builder-base
ARG ANDROID_CLANG_VERSION
ARG ANDROID_CLANG_PREBUILTS_COMMIT
-ARG ANDROID_SYSROOT_BID
+ARG ANDROID_SYSROOT_COMMIT
RUN apt-get update && apt-get install -y curl bzip2 git unzip
@@ -217,19 +217,18 @@ RUN <<EOF
ls /opt/android/clang/clang-current/bin/clang
EOF
-# Install an Android sysroot. New AOSP sysroots are available at
-# https://ci.android.com/builds/branches/aosp-main/grid, the "ndk" target. The
-# NDK also makes its sysroot prebuilt available at
-# https://android.googlesource.com/platform/prebuilts/ndk/+/refs/heads/dev/platform/sysroot.
+# Install an Android sysroot. New Android sysroots are available at
+# https://android.googlesource.com/platform/prebuilts/ndk/+/refs/heads/mirror-goog-main-ndk/platform/sysroot.
-ENV ANDROID_SYSROOT_BID=$ANDROID_SYSROOT_BID
+ENV ANDROID_SYSROOT_COMMIT=$ANDROID_SYSROOT_COMMIT
RUN <<EOF
set -e
- cd /opt/android
- curl -L -o ndk_platform.tar.bz2 \
- https://androidbuildinternal.googleapis.com/android/internal/build/v3/builds/${ANDROID_SYSROOT_BID}/ndk/attempts/latest/artifacts/ndk_platform.tar.bz2/url
- tar xf ndk_platform.tar.bz2
- rm ndk_platform.tar.bz2
+ mkdir -p /opt/android/ndk
+ cd /opt/android/ndk
+ git clone --filter=blob:none https://android.googlesource.com/platform/prebuilts/ndk tmp
+ git -C tmp checkout ${ANDROID_SYSROOT_COMMIT}
+ mv tmp/platform/sysroot .
+ rm -rf tmp
EOF
# ===----------------------------------------------------------------------===##
diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml
index 2189a41555c2f..4efc6d2a570e3 100644
--- a/libcxx/utils/ci/docker-compose.yml
+++ b/libcxx/utils/ci/docker-compose.yml
@@ -21,7 +21,7 @@ services:
target: android-buildkite-builder
args:
BASE_IMAGE: ubuntu:noble
- ANDROID_CLANG_VERSION: r536225
- ANDROID_CLANG_PREBUILTS_COMMIT: 3f67b93ee7a50ae2a3cb34cc32d0589415cc0a9c
- ANDROID_SYSROOT_BID: 12644632
+ ANDROID_CLANG_VERSION: r563880
+ ANDROID_CLANG_PREBUILTS_COMMIT: 6ae4184bb8706f9731569b9a0a82be3fcdcb951c
+ ANDROID_SYSROOT_COMMIT: f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f
<<: *compiler_versions
>From 4af6cb7ae5b66a052b2425d765330dfa5d421753 Mon Sep 17 00:00:00 2001
From: Ryan Prichard <rprichard at google.com>
Date: Wed, 16 Jul 2025 13:21:27 -0700
Subject: [PATCH 2/2] Restore Android test markers, but use UNSUPPORTED instead
of XFAIL
---
.../meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp | 3 +++
.../has_unique_object_representations.compile.pass.cpp | 3 +++
2 files changed, 6 insertions(+)
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
index 8e57e8913dcbe..97e3afed1c036 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
@@ -7,6 +7,9 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// The Clang version that Android currently uses in the CI is too old.
+// UNSUPPORTED: LIBCXX-ANDROID-FIXME
+
// type_traits
// is_bounded_array<T>
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
index bd7da40daf2bc..ac63fec691377 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.compile.pass.cpp
@@ -8,6 +8,9 @@
// UNSUPPORTED: c++03, c++11, c++14
+// The Clang version that Android currently uses in the CI is too old.
+// UNSUPPORTED: LIBCXX-ANDROID-FIXME
+
// type_traits
// has_unique_object_representations
More information about the libcxx-commits
mailing list