diff options
-rw-r--r-- | core/binary.mk | 2 | ||||
-rw-r--r-- | core/clang/config.mk | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/binary.mk b/core/binary.mk index 8251143..4b545e9 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -184,12 +184,14 @@ ifeq ($(strip $(LOCAL_ADDRESS_SANITIZER)),true) my_cflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS) my_ldflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS) ifdef LOCAL_IS_HOST_MODULE + my_ldflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_HOST) my_ldlibs += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_HOST) my_shared_libraries += \ $(ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_HOST) my_static_libraries += \ $(ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_HOST) else + my_ldflags += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_TARGET) my_ldlibs += $(ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_TARGET) my_shared_libraries += \ $(ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_TARGET) diff --git a/core/clang/config.mk b/core/clang/config.mk index 37eeae1..0027cbf 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -94,10 +94,12 @@ ADDRESS_SANITIZER_RUNTIME_LIBRARY := libclang_rt.asan_$(TARGET_ARCH)_android ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address -fno-omit-frame-pointer ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS := -Wl,-u,__asan_preinit +ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_HOST := -rdynamic ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_HOST := -lpthread -ldl ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_HOST := ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_HOST := libasan +ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS_TARGET := ADDRESS_SANITIZER_CONFIG_EXTRA_LDLIBS_TARGET := ADDRESS_SANITIZER_CONFIG_EXTRA_SHARED_LIBRARIES_TARGET := libdl $(ADDRESS_SANITIZER_RUNTIME_LIBRARY) ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_TARGET := libasan |