summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2021-12-15 14:51:30 -0800
committerColin Cross <ccross@android.com>2021-12-15 15:05:52 -0800
commit0b40b332ff6da0377d16b380e47b2c36021088e1 (patch)
tree1310d30a760d2309aeea9845a45dfe3f3f3633f9
parent1f850056d361c8529329041eeb3fc1b50290366c (diff)
downloadgwp_asan-android-s-v2-beta-3.tar.gz
Support building gwp_asan against musl libc by moving the bionic-specific headers to only be used when compiling against bionic. Bug: 190084016 Test: m USE_HOST_MUSL=true host-native Change-Id: I1fd58cd277c16e50f95e8213e54029000d947844
-rw-r--r--Android.bp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp
index 4b57e62..e45795f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -71,7 +71,12 @@ cc_defaults {
// GWP-ASan is used by bionic libc, and should have no libc/libc++
// dependencies.
- system_shared_libs: [],
+ target: {
+ bionic: {
+ system_shared_libs: [],
+ header_libs: ["libc_headers"],
+ },
+ },
stl: "none",
}
@@ -104,7 +109,6 @@ cc_library_static {
defaults: ["gwp_asan_no_libs_defaults"],
header_libs: [
"gwp_asan_headers",
- "libc_headers", // Required for pthread.h in mutex.h.
],
srcs: [
"gwp_asan/common.cpp",
@@ -139,7 +143,6 @@ cc_library {
defaults: ["gwp_asan_defaults"],
header_libs: [
"gwp_asan_headers",
- "libc_headers", // Required for assert.h
],
srcs: [
"gwp_asan/common.cpp",