Merge \\"Apply SANITIZE_TARGET and LOCAL_SANITIZE when both are present.\\" am: 9c88e0bfa2
am: 120112ee23
Change-Id: I126d080bf84cf049d6f7f8de1881e4f89e057561
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk
index 18b7478..41f0680 100644
--- a/core/config_sanitizers.mk
+++ b/core/config_sanitizers.mk
@@ -19,9 +19,8 @@
endif
endif
-# The sanitizer specified by the environment wins over the module.
ifneq ($(my_global_sanitize),)
- my_sanitize := $(my_global_sanitize)
+ my_sanitize := $(my_global_sanitize) $(my_sanitize)
endif
# The sanitizer specified in the product configuration wins over the previous.
@@ -118,11 +117,10 @@
my_ldflags += -fsanitize=$(fsanitize_arg)
my_ldlibs += -lrt -ldl
else
- ifeq ($(filter address,$(my_sanitize)),)
- my_cflags += -fsanitize-trap=all
- my_cflags += -ftrap-function=abort
- endif
+ my_cflags += -fsanitize-trap=all
+ my_cflags += -ftrap-function=abort
ifneq ($(filter address thread,$(my_sanitize)),)
+ my_cflags += -fno-sanitize-trap=address,thread
my_shared_libraries += libdl
endif
endif