[libcxx-commits] [libcxx] [llvm] Update Android CI and Emulator image to API 23 (PR #194936)
Sharjeel Khan via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 29 21:40:34 PDT 2026
https://github.com/Sharjeel-Khan updated https://github.com/llvm/llvm-project/pull/194936
>From 6bcde6b722a50d6c876f751495e88bdf4e7ad995 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Mon, 27 Apr 2026 22:25:43 +0000
Subject: [PATCH 01/13] Update Android CI and Emulator image to API 23
As seen in https://github.com/android/ndk/issues/2188, NDK will raise
minimum supported version to API 23 (Android 6.0) in r31. We need to
bump the API level for the x86 emulator image then use it for the CI.
---
libcxx/utils/ci/buildkite-pipeline.yml | 4 ++--
libcxx/utils/ci/vendor/android/build-emulator-images.sh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index eb2804e5cbef1..d4107cf11ad51 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -153,8 +153,8 @@ steps:
- group: ':android: Android'
steps:
- - label: Android 5.0, x86 NDK
- command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
+ - label: Android 6.0, x86 NDK
+ command: libcxx/utils/ci/run-buildbot android-ndk-23-def-x86
env:
CC: /opt/android/clang/clang-current/bin/clang
CXX: /opt/android/clang/clang-current/bin/clang++
diff --git a/libcxx/utils/ci/vendor/android/build-emulator-images.sh b/libcxx/utils/ci/vendor/android/build-emulator-images.sh
index 4e29c172e47ed..4fdb81c5cafc3 100755
--- a/libcxx/utils/ci/vendor/android/build-emulator-images.sh
+++ b/libcxx/utils/ci/vendor/android/build-emulator-images.sh
@@ -24,5 +24,5 @@ build_image() {
cd "${THIS_DIR}"
-build_image 21-def-x86
+build_image 23-def-x86
build_image 33-goog-x86_64
>From f6f36951624b0542a4b0e98e060f1c97e7cdfbba Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Tue, 28 Apr 2026 00:01:10 +0000
Subject: [PATCH 02/13] Update Android cmake files to API 23 for Libc++ CI
---
runtimes/cmake/android/Arch-arm.cmake | 8 ++++----
runtimes/cmake/android/Arch-arm64.cmake | 8 ++++----
runtimes/cmake/android/Arch-x86.cmake | 8 ++++----
runtimes/cmake/android/Arch-x86_64.cmake | 8 ++++----
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/runtimes/cmake/android/Arch-arm.cmake b/runtimes/cmake/android/Arch-arm.cmake
index c9e6e2509cb2e..34b8a0edb72ec 100644
--- a/runtimes/cmake/android/Arch-arm.cmake
+++ b/runtimes/cmake/android/Arch-arm.cmake
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
set(CMAKE_SYSTEM_PROCESSOR "armv7-a" CACHE STRING "")
-set(CMAKE_ASM_COMPILER_TARGET "armv7a-linux-androideabi21" CACHE STRING "")
-set(CMAKE_C_COMPILER_TARGET "armv7a-linux-androideabi21" CACHE STRING "")
-set(CMAKE_CXX_COMPILER_TARGET "armv7a-linux-androideabi21" CACHE STRING "")
-set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
+set(CMAKE_ASM_COMPILER_TARGET "armv7a-linux-androideabi23" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "armv7a-linux-androideabi23" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "armv7a-linux-androideabi23" CACHE STRING "")
+set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
diff --git a/runtimes/cmake/android/Arch-arm64.cmake b/runtimes/cmake/android/Arch-arm64.cmake
index 9cae3313fad0d..9a50b347f68b0 100644
--- a/runtimes/cmake/android/Arch-arm64.cmake
+++ b/runtimes/cmake/android/Arch-arm64.cmake
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
set(CMAKE_SYSTEM_PROCESSOR "aarch64" CACHE STRING "")
-set(CMAKE_ASM_COMPILER_TARGET "aarch64-linux-android21" CACHE STRING "")
-set(CMAKE_C_COMPILER_TARGET "aarch64-linux-android21" CACHE STRING "")
-set(CMAKE_CXX_COMPILER_TARGET "aarch64-linux-android21" CACHE STRING "")
-set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
+set(CMAKE_ASM_COMPILER_TARGET "aarch64-linux-android23" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "aarch64-linux-android23" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "aarch64-linux-android23" CACHE STRING "")
+set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
diff --git a/runtimes/cmake/android/Arch-x86.cmake b/runtimes/cmake/android/Arch-x86.cmake
index 31b7a719e6a3d..3fe76803349f4 100644
--- a/runtimes/cmake/android/Arch-x86.cmake
+++ b/runtimes/cmake/android/Arch-x86.cmake
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
set(CMAKE_SYSTEM_PROCESSOR "i686" CACHE STRING "")
-set(CMAKE_ASM_COMPILER_TARGET "i686-linux-android21" CACHE STRING "")
-set(CMAKE_C_COMPILER_TARGET "i686-linux-android21" CACHE STRING "")
-set(CMAKE_CXX_COMPILER_TARGET "i686-linux-android21" CACHE STRING "")
-set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
+set(CMAKE_ASM_COMPILER_TARGET "i686-linux-android23" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "i686-linux-android23" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "i686-linux-android23" CACHE STRING "")
+set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
diff --git a/runtimes/cmake/android/Arch-x86_64.cmake b/runtimes/cmake/android/Arch-x86_64.cmake
index a109fac6974f5..061cb39e169c5 100644
--- a/runtimes/cmake/android/Arch-x86_64.cmake
+++ b/runtimes/cmake/android/Arch-x86_64.cmake
@@ -1,7 +1,7 @@
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
set(CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING "")
-set(CMAKE_ASM_COMPILER_TARGET "x86_64-linux-android21" CACHE STRING "")
-set(CMAKE_C_COMPILER_TARGET "x86_64-linux-android21" CACHE STRING "")
-set(CMAKE_CXX_COMPILER_TARGET "x86_64-linux-android21" CACHE STRING "")
-set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
+set(CMAKE_ASM_COMPILER_TARGET "x86_64-linux-android23" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "x86_64-linux-android23" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET "x86_64-linux-android23" CACHE STRING "")
+set(ANDROID_NATIVE_API_LEVEL 23 CACHE STRING "")
>From 2bc0c452bd3162011e18fc77935b9472d8709796 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Tue, 28 Apr 2026 00:03:57 +0000
Subject: [PATCH 03/13] Generate new ABI list for i686-android23 and drop the
i686-android21
---
...linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist} | 1 +
1 file changed, 1 insertion(+)
rename libcxx/lib/abi/{i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist => i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist} (99%)
diff --git a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
similarity index 99%
rename from libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist
rename to libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
index 767a3a9d0da06..814fa26349b3d 100644
--- a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1,5 +1,6 @@
{'is_defined': False, 'name': '__cxa_atexit at LIBC', 'type': 'FUNC'}
{'is_defined': False, 'name': '__cxa_finalize at LIBC', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_thread_atexit_impl at LIBC', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt10bad_typeid4whatEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt11logic_error4whatEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'}
>From ba9138f062f6e7646de664f69a556af386e6a8d5 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Tue, 28 Apr 2026 00:20:54 +0000
Subject: [PATCH 04/13] Generate new ABI list for x86_64-android23 and drop the
x86_64-android21
---
...linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist} | 1 +
1 file changed, 1 insertion(+)
rename libcxx/lib/abi/{x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist => x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist} (99%)
diff --git a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
similarity index 99%
rename from libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist
rename to libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
index c3826e77c101f..975d7ae118bf5 100644
--- a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1,5 +1,6 @@
{'is_defined': False, 'name': '__cxa_atexit at LIBC', 'type': 'FUNC'}
{'is_defined': False, 'name': '__cxa_finalize at LIBC', 'type': 'FUNC'}
+{'is_defined': False, 'name': '__cxa_thread_atexit_impl at LIBC', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt10bad_typeid4whatEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt11logic_error4whatEv', 'type': 'FUNC'}
{'is_defined': True, 'name': '_ZNKSt12bad_any_cast4whatEv', 'type': 'FUNC'}
>From 5d38a2a6a152c52682ceec305820a29ba3c6fd45 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 18:15:58 +0000
Subject: [PATCH 05/13] Force Current Working Directory to be readable and
writable
---
libcxx/utils/adb_run.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index cddbd191e9881..af61983fedecd 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -63,10 +63,16 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
if not os.path.islink(local_file) and os.path.isfile(local_file):
run_adb_sync_command(["adb", "push", "--sync", local_file,
remote_file])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
return
assert os.path.basename(local_dir) == os.path.basename(remote_dir)
run_adb_sync_command(["adb", "shell", "mkdir", "-p", remote_dir])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
run_adb_sync_command(["adb", "push", "--sync", local_dir,
os.path.dirname(remote_dir)])
>From 164136311b2ed373727df3b53013341028da5d14 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 19:16:46 +0000
Subject: [PATCH 06/13] Filter warning for Android API 23
---
libcxx/utils/adb_run.py | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index af61983fedecd..c78327723b15c 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -63,19 +63,20 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
if not os.path.islink(local_file) and os.path.isfile(local_file):
run_adb_sync_command(["adb", "push", "--sync", local_file,
remote_file])
- run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
- run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
- run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
return
assert os.path.basename(local_dir) == os.path.basename(remote_dir)
run_adb_sync_command(["adb", "shell", "mkdir", "-p", remote_dir])
- run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
- run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
- run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
run_adb_sync_command(["adb", "push", "--sync", local_dir,
os.path.dirname(remote_dir)])
+ # Android M (API 23) x86 emulator doesn't have permissions to write to
+ # /data/local/tmp, so we need to change the permissions of the
+ # directory.
+ run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
+ run_adb_sync_command(["adb", "shell", "chmod", "777",
+ os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
def build_env_arg(env_args: List[str], prepend_path_args: List[Tuple[str, str]]) -> str:
components = []
@@ -210,7 +211,14 @@ def run_command(args: argparse.Namespace) -> int:
f" output: {output}\n")
return 1
- sys.stderr.write(match.group(1))
+ # Android M (API 23) will print a warning for DT_FLAGS_1=0x8000001
+ # because they were not set in the dynamic flags since Android N.
+ stderr_content = match.group(1)
+ stderr_content = re.sub(
+ r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?", "",
+ stderr_content, flags=re.MULTILINE)
+
+ sys.stderr.write(stderr_content)
sys.stdout.write(match.group(2))
return int(match.group(3))
>From c1f2df4d7393210a7280a1de7dc515a0f063dfd9 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 21:34:15 +0000
Subject: [PATCH 07/13] Fix Python code formatter
---
libcxx/utils/adb_run.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index c78327723b15c..2448b1e025436 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -63,19 +63,23 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
if not os.path.islink(local_file) and os.path.isfile(local_file):
run_adb_sync_command(["adb", "push", "--sync", local_file,
remote_file])
+ # Android M (API 23) x86 emulator doesn't have permissions to write to
+ # /data/local/tmp, so we need to change the permissions of the
+ # directory.
+ run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
return
assert os.path.basename(local_dir) == os.path.basename(remote_dir)
run_adb_sync_command(["adb", "shell", "mkdir", "-p", remote_dir])
- run_adb_sync_command(["adb", "push", "--sync", local_dir,
- os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "push", "--sync", local_dir, os.path.dirname(remote_dir)])
# Android M (API 23) x86 emulator doesn't have permissions to write to
# /data/local/tmp, so we need to change the permissions of the
# directory.
run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
- run_adb_sync_command(["adb", "shell", "chmod", "777",
- os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
def build_env_arg(env_args: List[str], prepend_path_args: List[Tuple[str, str]]) -> str:
@@ -215,8 +219,10 @@ def run_command(args: argparse.Namespace) -> int:
# because they were not set in the dynamic flags since Android N.
stderr_content = match.group(1)
stderr_content = re.sub(
- r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?", "",
- stderr_content, flags=re.MULTILINE)
+ r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?",
+ "",
+ stderr_content,
+ flags=re.MULTILINE)
sys.stderr.write(stderr_content)
sys.stdout.write(match.group(2))
>From 147e366bcb6c11bbdfc60ac8b3b8238892a7f8c8 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 21:38:30 +0000
Subject: [PATCH 08/13] Fix new Python Formatter errors
---
libcxx/utils/adb_run.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index 2448b1e025436..a5fbfd3b8ee77 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -67,13 +67,16 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
# /data/local/tmp, so we need to change the permissions of the
# directory.
run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
- run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
+ run_adb_sync_command(
+ ["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)]
+ )
run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
return
assert os.path.basename(local_dir) == os.path.basename(remote_dir)
run_adb_sync_command(["adb", "shell", "mkdir", "-p", remote_dir])
- run_adb_sync_command(["adb", "push", "--sync", local_dir, os.path.dirname(remote_dir)])
+ run_adb_sync_command(["adb", "push", "--sync", local_dir,
+ os.path.dirname(remote_dir)])
# Android M (API 23) x86 emulator doesn't have permissions to write to
# /data/local/tmp, so we need to change the permissions of the
@@ -222,7 +225,8 @@ def run_command(args: argparse.Namespace) -> int:
r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?",
"",
stderr_content,
- flags=re.MULTILINE)
+ flags=re.MULTILINE
+ )
sys.stderr.write(stderr_content)
sys.stdout.write(match.group(2))
>From 8fc65b721fc184145519c819fc4192f04f4cc28d Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 21:40:44 +0000
Subject: [PATCH 09/13] Fix another Python formatter issue
---
libcxx/utils/adb_run.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index a5fbfd3b8ee77..a1bc96f2dd511 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -225,7 +225,7 @@ def run_command(args: argparse.Namespace) -> int:
r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?",
"",
stderr_content,
- flags=re.MULTILINE
+ flags=re.MULTILINE,
)
sys.stderr.write(stderr_content)
>From 9d3204d2e4ba478dc00afb88aeea57e791d47ddb Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 22:16:03 +0000
Subject: [PATCH 10/13] Add back Android 5.0 (API 21) to test it still works
---
libcxx/utils/ci/buildkite-pipeline.yml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index d4107cf11ad51..59354b532fefe 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -153,6 +153,16 @@ steps:
- group: ':android: Android'
steps:
+ - label: Android 5.0, x86 NDK
+ command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
+ env:
+ CC: /opt/android/clang/clang-current/bin/clang
+ CXX: /opt/android/clang/clang-current/bin/clang++
+ agents:
+ queue: libcxx-builders
+ os: android
+ <<: *common
+
- label: Android 6.0, x86 NDK
command: libcxx/utils/ci/run-buildbot android-ndk-23-def-x86
env:
>From 87b341d3feb29bfcdf6b659816d31c356691a6a3 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Wed, 29 Apr 2026 22:36:33 +0000
Subject: [PATCH 11/13] Triggering build
>From 2a6f038f440c7c1173628d1c71f4a0e9319432eb Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Thu, 30 Apr 2026 00:14:12 +0000
Subject: [PATCH 12/13] Remove Android 5.0 (API 21) CI since we do not need it
anymore
---
libcxx/utils/ci/buildkite-pipeline.yml | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 59354b532fefe..d4107cf11ad51 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -153,16 +153,6 @@ steps:
- group: ':android: Android'
steps:
- - label: Android 5.0, x86 NDK
- command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
- env:
- CC: /opt/android/clang/clang-current/bin/clang
- CXX: /opt/android/clang/clang-current/bin/clang++
- agents:
- queue: libcxx-builders
- os: android
- <<: *common
-
- label: Android 6.0, x86 NDK
command: libcxx/utils/ci/run-buildbot android-ndk-23-def-x86
env:
>From a9eb2cd0d1c41f99ead4bd8979fd1241e0b9d864 Mon Sep 17 00:00:00 2001
From: Sharjeel Khan <sharjeelkhan at google.com>
Date: Thu, 30 Apr 2026 04:40:14 +0000
Subject: [PATCH 13/13] Fix comments
---
libcxx/utils/adb_run.py | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/libcxx/utils/adb_run.py b/libcxx/utils/adb_run.py
index a1bc96f2dd511..d4b1e9ac096a8 100755
--- a/libcxx/utils/adb_run.py
+++ b/libcxx/utils/adb_run.py
@@ -63,9 +63,11 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
if not os.path.islink(local_file) and os.path.isfile(local_file):
run_adb_sync_command(["adb", "push", "--sync", local_file,
remote_file])
- # Android M (API 23) x86 emulator doesn't have permissions to write to
- # /data/local/tmp, so we need to change the permissions of the
- # directory.
+ # Some libc++ tests create temporary files in the working directory,
+ # which might be owned by root. In Android M (API 23), the
+ # directories are owned by root so they are not writable by the
+ # shell user. Make them writable before running the tests as the shell
+ # user.
run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
run_adb_sync_command(
["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)]
@@ -78,9 +80,10 @@ def sync_test_dir(local_dir: str, remote_dir: str) -> None:
run_adb_sync_command(["adb", "push", "--sync", local_dir,
os.path.dirname(remote_dir)])
- # Android M (API 23) x86 emulator doesn't have permissions to write to
- # /data/local/tmp, so we need to change the permissions of the
- # directory.
+ # Some libc++ tests create temporary files in the working directory, which might be
+ # owned by root. In Android M (API 23), the directories are owned by root so they are
+ # not writable by the shell user. Make them writable before running the tests as the
+ # shell user.
run_adb_sync_command(["adb", "shell", "chmod", "777", REMOTE_BASE_DIR])
run_adb_sync_command(["adb", "shell", "chmod", "777", os.path.dirname(remote_dir)])
run_adb_sync_command(["adb", "shell", "chmod", "777", remote_dir])
@@ -129,10 +132,6 @@ def run_command(args: argparse.Namespace) -> int:
# and always run as root. Non-debug builds typically lack `su` and only
# run as the shell user.
#
- # Some libc++ tests create temporary files in the working directory,
- # which might be owned by root. Before switching to shell, make the
- # cwd writable (and readable+executable) to every user.
- #
# N.B.:
# - Avoid "id -u" because it wasn't supported until Android M.
# - The `env` and `which` commands were also added in Android M.
@@ -219,7 +218,7 @@ def run_command(args: argparse.Namespace) -> int:
return 1
# Android M (API 23) will print a warning for DT_FLAGS_1=0x8000001
- # because they were not set in the dynamic flags since Android N.
+ # because they were not set until 2016 which is Android O.
stderr_content = match.group(1)
stderr_content = re.sub(
r"^WARNING: linker: .*unsupported flags DT_FLAGS_1=.*\n?",
More information about the libcxx-commits
mailing list