diff options
-rw-r--r-- | libc/Android.bp | 19 | ||||
-rw-r--r-- | libc/bionic/malloc_common.cpp | 2 | ||||
-rw-r--r-- | libc/bionic/malloc_common_dynamic.cpp | 2 | ||||
-rw-r--r-- | libc/bionic/malloc_heapprofd.cpp | 2 | ||||
-rw-r--r-- | libc/malloc_debug/Android.bp | 12 | ||||
-rw-r--r-- | libc/malloc_debug/tests/malloc_debug_system_tests.cpp | 2 | ||||
-rw-r--r-- | libc/malloc_hooks/Android.bp | 8 | ||||
-rw-r--r-- | libc/malloc_hooks/tests/malloc_hooks_tests.cpp | 2 | ||||
-rw-r--r-- | libc/platform/bionic/malloc.h (renamed from libc/private/bionic_malloc.h) | 0 | ||||
-rw-r--r-- | tests/malloc_test.cpp | 2 |
10 files changed, 43 insertions, 8 deletions
diff --git a/libc/Android.bp b/libc/Android.bp index e505c67ec..e1c007208 100644 --- a/libc/Android.bp +++ b/libc/Android.bp @@ -1726,6 +1726,25 @@ cc_library_headers { sdk_version: "current", } +// Headers that only other parts of the platform can include. +cc_library_headers { + name: "bionic_libc_platform_headers", + visibility: [ + "//bionic/libc/malloc_debug:__subpackages__", + "//bionic/libc/malloc_hooks:__subpackages__", + "//frameworks/av/media/libmedia:__subpackages__", + "//frameworks/av/media/utils:__subpackages__", + "//frameworks/base/core/jni:__subpackages__", + "//frameworks/base/services/core/jni:__subpackages__", + "//external/perfetto:__subpackages__", + ], + host_supported: true, + export_include_dirs: [ + "platform", + ], + sdk_version: "current", +} + // libc_headers for libasync_safe and libpropertyinfoparser cc_library_headers { name: "libc_headers", diff --git a/libc/bionic/malloc_common.cpp b/libc/bionic/malloc_common.cpp index 9dc4d12d1..96e614048 100644 --- a/libc/bionic/malloc_common.cpp +++ b/libc/bionic/malloc_common.cpp @@ -39,7 +39,7 @@ #include <stdio.h> #include <private/bionic_config.h> -#include <private/bionic_malloc.h> +#include <platform/bionic/malloc.h> #include "malloc_common.h" #include "malloc_limit.h" diff --git a/libc/bionic/malloc_common_dynamic.cpp b/libc/bionic/malloc_common_dynamic.cpp index 803574649..9ad79a0d0 100644 --- a/libc/bionic/malloc_common_dynamic.cpp +++ b/libc/bionic/malloc_common_dynamic.cpp @@ -57,10 +57,10 @@ #include <android/dlext.h> +#include <platform/bionic/malloc.h> #include <private/bionic_config.h> #include <private/bionic_defs.h> #include <private/bionic_malloc_dispatch.h> -#include <private/bionic_malloc.h> #include <sys/system_properties.h> diff --git a/libc/bionic/malloc_heapprofd.cpp b/libc/bionic/malloc_heapprofd.cpp index d0117f382..62249fb1d 100644 --- a/libc/bionic/malloc_heapprofd.cpp +++ b/libc/bionic/malloc_heapprofd.cpp @@ -37,8 +37,8 @@ #include <stdlib.h> #include <unistd.h> +#include <platform/bionic/malloc.h> #include <private/bionic_config.h> -#include <private/bionic_malloc.h> #include <private/bionic_malloc_dispatch.h> #include <sys/system_properties.h> diff --git a/libc/malloc_debug/Android.bp b/libc/malloc_debug/Android.bp index 2bff260d8..41c4f9d07 100644 --- a/libc/malloc_debug/Android.bp +++ b/libc/malloc_debug/Android.bp @@ -124,6 +124,10 @@ cc_test { "bionic/libc/async_safe/include", ], + header_libs: [ + "bionic_libc_platform_headers", + ], + static_libs: [ "libc_malloc_debug", "libtinyxml2", @@ -148,7 +152,13 @@ cc_test { cc_test { name: "malloc_debug_system_tests", - include_dirs: ["bionic/libc"], + include_dirs: [ + "bionic/libc", + ], + + header_libs: [ + "bionic_libc_platform_headers", + ], srcs: [ "tests/malloc_debug_system_tests.cpp", diff --git a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp index f85c45b87..071675875 100644 --- a/libc/malloc_debug/tests/malloc_debug_system_tests.cpp +++ b/libc/malloc_debug/tests/malloc_debug_system_tests.cpp @@ -45,7 +45,7 @@ #include <thread> #include <vector> -#include "private/bionic_malloc.h" +#include <bionic/malloc.h> static constexpr time_t kTimeoutSeconds = 10; diff --git a/libc/malloc_hooks/Android.bp b/libc/malloc_hooks/Android.bp index d119f896d..a0f81021f 100644 --- a/libc/malloc_hooks/Android.bp +++ b/libc/malloc_hooks/Android.bp @@ -49,7 +49,13 @@ cc_test { shared_libs: ["libbase"], local_include_dirs: ["tests"], - include_dirs: ["bionic/libc", "bionic"], + include_dirs: [ + "bionic/libc", + "bionic" + ], + header_libs: [ + "bionic_libc_platform_headers", + ], cflags: [ "-Wall", diff --git a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp index 86e20ea90..18587819a 100644 --- a/libc/malloc_hooks/tests/malloc_hooks_tests.cpp +++ b/libc/malloc_hooks/tests/malloc_hooks_tests.cpp @@ -38,7 +38,7 @@ #include <gtest/gtest.h> -#include <private/bionic_malloc.h> +#include <bionic/malloc.h> #include <private/bionic_malloc_dispatch.h> #include <tests/utils.h> diff --git a/libc/private/bionic_malloc.h b/libc/platform/bionic/malloc.h index 9c602eadf..9c602eadf 100644 --- a/libc/private/bionic_malloc.h +++ b/libc/platform/bionic/malloc.h diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp index edcc179ed..989e2d079 100644 --- a/tests/malloc_test.cpp +++ b/tests/malloc_test.cpp @@ -33,8 +33,8 @@ #include <android-base/file.h> +#include "platform/bionic/malloc.h" #include "private/bionic_config.h" -#include "private/bionic_malloc.h" #include "utils.h" #if defined(__BIONIC__) |