am 28c265dd: Merge "We also need -rdynamic for host ASAN."

* commit '28c265ddddebeabc0597e976fbc817b70c46abc2':
  We also need -rdynamic for host ASAN.
This commit is contained in:
Dan Albert 2014-10-20 22:36:45 +00:00 committed by Android Git Automerger
commit cc0aa4dabd
2 changed files with 4 additions and 0 deletions

View file

@ -182,12 +182,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)

View file

@ -93,10 +93,12 @@ endif
ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS := -fsanitize=address
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 libasan_preload
ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES_TARGET := libasan