Add libc_malloc_debug and _hooks to the runtime APEX
The two libraries share implementation details with libc.so, therefore
they should be bundled in the runtime APEX together with libc.so
Bug: 122566199
Test: m
Test: /art/tools/dist_linux_bionic.sh -j50 com.android.runtime.host
Merged-In: I2ee0b93855144bcc509c61b7db956c64528921f9
Change-Id: I2ee0b93855144bcc509c61b7db956c64528921f9
(cherry picked from commit a11e03c5073382227fa054f4e1191469cd0c5f13)
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 3d5d039..95aea3c 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -48,6 +48,14 @@
"libm",
"libdl",
]
+
+bionic_native_shared_libs_device = [
+ // ... and their internal dependencies
+ // These are available only on device
+ "libc_malloc_debug",
+ "libc_malloc_hooks",
+]
+
bionic_binaries_both = [
"linker",
]
@@ -231,6 +239,7 @@
apex {
name: "com.android.runtime.release",
defaults: ["com.android.runtime-defaults"],
+ native_shared_libs: bionic_native_shared_libs_device,
certificate: ":com.android.runtime.release.certificate",
}
@@ -241,7 +250,8 @@
name: "com.android.runtime.debug",
defaults: ["com.android.runtime-defaults"],
native_shared_libs: art_runtime_debug_native_shared_libs
- + libcore_debug_native_shared_libs,
+ + libcore_debug_native_shared_libs
+ + bionic_native_shared_libs_device,
multilib: {
prefer32: {
binaries: art_runtime_debug_binaries_prefer32
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index 074157f..b93a705 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -483,6 +483,9 @@
self._checker.check_native_library('bionic/libc')
self._checker.check_native_library('bionic/libdl')
self._checker.check_native_library('bionic/libm')
+ # ... and its internal dependencies
+ self._checker.check_native_library('libc_malloc_hooks')
+ self._checker.check_native_library('libc_malloc_debug')
# Check exported native libraries for Managed Core Library.
self._checker.check_native_library('libandroidicu')