From 1578cb3c142bbe41bec709dbb352fd88e8a085ba Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Tue, 21 Nov 2023 08:56:06 -0800 Subject: [PATCH] Introduce libutils_binder_sdk Bug: 285204695 Test: mma in Binder directory Change-Id: I430b81594167940cb47897e4261ad87c75ac3783 --- libutils/Android.bp | 18 +++++++++++++----- libutils/binder/Android.bp | 26 ++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/libutils/Android.bp b/libutils/Android.bp index 85a0fd209..1c622ff75 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -56,7 +56,7 @@ cc_library_headers { } cc_defaults { - name: "libutils_defaults", + name: "libutils_defaults_nodeps", vendor_available: true, product_available: true, recovery_available: true, @@ -69,10 +69,6 @@ cc_defaults { "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", ], - shared_libs: [ - "libcutils", - "liblog", - ], sanitize: { misc_undefined: ["integer"], }, @@ -117,6 +113,18 @@ cc_defaults { }, } +cc_defaults { + name: "libutils_defaults", + defaults: [ + "libutils_defaults_nodeps", + ], + + shared_libs: [ + "libcutils", + "liblog", + ], +} + cc_defaults { name: "libutils_impl_defaults", defaults: [ diff --git a/libutils/binder/Android.bp b/libutils/binder/Android.bp index a049f3d80..60b0cb62c 100644 --- a/libutils/binder/Android.bp +++ b/libutils/binder/Android.bp @@ -3,9 +3,9 @@ package { } cc_defaults { - name: "libutils_binder_impl_defaults", + name: "libutils_binder_impl_defaults_nodeps", defaults: [ - "libutils_defaults", + "libutils_defaults_nodeps", "apex-lowest-min-sdk-version", ], native_bridge_supported: true, @@ -30,11 +30,33 @@ cc_defaults { afdo: true, } +cc_defaults { + name: "libutils_binder_impl_defaults", + defaults: [ + "libutils_defaults", + "libutils_binder_impl_defaults_nodeps", + ], +} + cc_library { name: "libutils_binder", defaults: ["libutils_binder_impl_defaults"], } +cc_library_shared { + name: "libutils_binder_sdk", + defaults: ["libutils_binder_impl_defaults_nodeps"], + + header_libs: [ + "liblog_stub", + ], + + cflags: [ + "-DANDROID_LOG_STUB_WEAK_PRINT", + "-DANDROID_UTILS_CALLSTACK_ENABLED=0", + ], +} + cc_library { name: "libutils_binder_test_compile", defaults: ["libutils_binder_impl_defaults"],