From 8bf9b1632e4fadc6e960fa6697037c8fc6401a5c Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Sat, 7 Mar 2020 16:36:09 +0900 Subject: [PATCH] Set apex_available property The marked library(ies) were available to the APEXes via the hand-written whitelist in build/soong/apex/apex.go. Trying to remove the whitelist by adding apex_available property to the Android.bp of the libraries. In this change, following libs were made available to all apexes because their usage is quite common and there is no reason to restrict them to some APEXes. * libbase_headers * libcutils, libcutils_headers * libutils_headers, libsystem_headers * liblog_headers * libbacktrace, libbacktrace_headers * libcrypto_utils Bug: 150999716 Test: m Change-Id: If3d3652e6604ed4f6d7694fe7ac61ae496621026 --- base/Android.bp | 4 ++++ libbacktrace/Android.bp | 8 ++++++++ libcrypto_utils/Android.bp | 4 ++++ libcutils/Android.bp | 8 ++++++++ liblog/Android.bp | 4 ++++ libsystem/Android.bp | 4 ++++ libutils/Android.bp | 4 ++++ 7 files changed, 36 insertions(+) diff --git a/base/Android.bp b/base/Android.bp index 25c74f219..fc8dff1fa 100644 --- a/base/Android.bp +++ b/base/Android.bp @@ -47,6 +47,10 @@ cc_library_headers { enabled: true, }, }, + apex_available: [ + "//apex_available:anyapex", + "//apex_available:platform", + ], } cc_defaults { diff --git a/libbacktrace/Android.bp b/libbacktrace/Android.bp index 565f2c35e..57531c848 100644 --- a/libbacktrace/Android.bp +++ b/libbacktrace/Android.bp @@ -44,12 +44,20 @@ cc_library_headers { recovery_available: true, native_bridge_supported: true, export_include_dirs: ["include"], + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], } cc_library { name: "libbacktrace", vendor_available: false, recovery_available: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], vndk: { enabled: true, support_system_process: true, diff --git a/libcrypto_utils/Android.bp b/libcrypto_utils/Android.bp index e47560f79..d7175e0be 100644 --- a/libcrypto_utils/Android.bp +++ b/libcrypto_utils/Android.bp @@ -38,4 +38,8 @@ cc_library { enabled: true, }, }, + apex_available: [ + "//apex_available:platform", + "com.android.adbd", + ], } diff --git a/libcutils/Android.bp b/libcutils/Android.bp index 8e90ddfd9..3b2f30c31 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -29,6 +29,10 @@ cc_library_headers { vendor_available: true, recovery_available: true, host_supported: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], native_bridge_supported: true, export_include_dirs: ["include"], target: { @@ -137,6 +141,10 @@ cc_library { }, recovery_available: true, host_supported: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], native_bridge_supported: true, srcs: [ "config_utils.cpp", diff --git a/liblog/Android.bp b/liblog/Android.bp index f1e511868..50faa2a3d 100644 --- a/liblog/Android.bp +++ b/liblog/Android.bp @@ -38,6 +38,10 @@ cc_library_headers { vendor_available: true, ramdisk_available: true, recovery_available: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], native_bridge_supported: true, export_include_dirs: ["include"], system_shared_libs: [], diff --git a/libsystem/Android.bp b/libsystem/Android.bp index b265b61eb..ff886fd18 100644 --- a/libsystem/Android.bp +++ b/libsystem/Android.bp @@ -4,6 +4,10 @@ cc_library_headers { recovery_available: true, host_supported: true, native_bridge_supported: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], export_include_dirs: ["include"], target: { diff --git a/libutils/Android.bp b/libutils/Android.bp index 9ddbedfbc..3ab619b31 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -18,6 +18,10 @@ cc_library_headers { recovery_available: true, host_supported: true, native_bridge_supported: true, + apex_available: [ + "//apex_available:platform", + "//apex_available:anyapex", + ], header_libs: [ "liblog_headers",