From 912b51f8abc1947c81a0cfbe2d8951751fdf85c6 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Thu, 19 May 2016 17:49:51 -0700 Subject: [PATCH] Sanitizer build tweaks. -Wl,-no-undefined is currently disabled for any SANITIZE_TARGET. Limit that to the sanitizers with a runtime library (i.e. address, thread). Re-enable the relocation packer for ASan. This has been fixed upstream a long time ago. Bug: 27729263 Change-Id: I566df6104de816223dc1c519d41a87629ce9c47c --- core/config_sanitizers.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 6b18be516f..b69a6ce20b 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -55,17 +55,13 @@ endif # 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