From 4e65cf4f40dae38b29a4537fda22f495ed1d1ca2 Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Sat, 3 May 2025 12:00:27 +0200 Subject: [PATCH] android: Link with libc++fs up to SDK 35 Before SDK35 the c++ filesystem API was part of a standalone library Reviewed-by: Mauro Rossi Backport-to: 25.1 Part-of: (cherry picked from commit 84cae30f0abdff7d8819ea33a1960ce673c0e9c5) --- .pick_status.json | 2 +- android/Android.mk | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 416352665e7..c92e318fcb2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -654,7 +654,7 @@ "description": "android: Link with libc++fs up to SDK 35", "nominated": true, "nomination_type": 4, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/android/Android.mk b/android/Android.mk index 1df8da523af..4f3a69a8e81 100644 --- a/android/Android.mk +++ b/android/Android.mk @@ -51,6 +51,11 @@ LOCAL_HEADER_LIBRARIES := libnativebase_headers hwvulkan_headers MESON_GEN_PKGCONFIGS := log cutils expat hardware libdrm:$(LIBDRM_VERSION) nativewindow sync zlib:1.2.11 libelf LOCAL_CFLAGS += $(BOARD_MESA3D_CFLAGS) +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 35; echo $$?), 0) +# Before SDK35 the c++ filesystem API was part of a standalone library +LOCAL_STATIC_LIBRARIES += libc++fs +endif + ifneq ($(filter swrast,$(BOARD_MESA3D_GALLIUM_DRIVERS) $(BOARD_MESA3D_VULKAN_DRIVERS)),) ifeq ($(BOARD_MESA3D_FORCE_SOFTPIPE),) MESON_GEN_LLVM_STUB := true