Merge "Build: Fix vendor sanitizer library for secondary arch"
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 26dbb73..b69a6ce 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -55,17 +55,13 @@
# sanitized static libraries. That's OK, because the executable
# always depends on the ASan runtime library, which defines these
# symbols.
-ifneq ($(strip $(SANITIZE_TARGET)),)
+ifneq ($(filter address thread,$(strip $(SANITIZE_TARGET))),)
ifndef LOCAL_IS_HOST_MODULE
ifeq ($(LOCAL_MODULE_CLASS),SHARED_LIBRARIES)
ifeq ($(my_sanitize),)
my_allow_undefined_symbols := true
endif
endif
- # Workaround for a bug in AddressSanitizer that breaks stack unwinding.
- # https://code.google.com/p/address-sanitizer/issues/detail?id=387
- # Revert when external/compiler-rt is updated past r236014.
- LOCAL_PACK_MODULE_RELOCATIONS := false
endif
endif
@@ -101,7 +97,9 @@
my_cflags += -fsanitize-trap=all
my_cflags += -ftrap-function=abort
endif
- my_shared_libraries += libdl
+ ifneq ($(filter address thread,$(my_sanitize)),)
+ my_shared_libraries += libdl
+ endif
endif
endif