libc_header is available to any apex but only visible to certain places
The header library is used by some libraries, such as libunwind_llvm,
which are automatically added as dependencies when stl is set to
libc++_static. Since such dependencies are not specificy to any APEX,
let's mark the header library be available (can be directly or
indirectly be part of an APEX) to any APEX. At the same time, limit the
visibility of the header library so that its uses are strictly limited
to the certain places that we acknowledge. (the places would be reduced
further when we will be successful in dropping the dependency to
libc_headers.)
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 152668052
Test: m
Merged-In: I85ee900947df2c9ce076e2f3aa3145645da77d2b
(cherry picked from commit ad9946c09acc4d826ff7e22590441b4e1d421d5c)
Change-Id: I85ee900947df2c9ce076e2f3aa3145645da77d2b
diff --git a/libc/Android.bp b/libc/Android.bp
index 9afba35..b90908e 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1782,9 +1782,15 @@
native_bridge_supported: true,
apex_available: [
"//apex_available:platform",
- "com.android.runtime",
- "com.android.art.debug",
- "com.android.art.release",
+ "//apex_available:anyapex",
+ ],
+ visibility: [
+ ":__subpackages__", // visible to bionic
+ // ... and only to these places (b/152668052)
+ "//external/gwp_asan",
+ "//external/libunwind_llvm",
+ "//system/core/property_service/libpropertyinfoparser",
+ "//system/extras/toolchain-extras",
],
no_libcrt: true,