diff options
author | Evgenii Stepanov <eugenis@google.com> | 2015-06-12 15:42:20 -0700 |
---|---|---|
committer | Evgenii Stepanov <eugenis@google.com> | 2015-06-19 11:15:51 -0700 |
commit | 1cbe3d944a93fa3a0f0d7a444bb69c644c83f385 (patch) | |
tree | 9c0346e3bcf33cc52ba5c8ca21a663c543b8847e /rootdir/Android.mk | |
parent | d2e7f0021dbf3f1f301f1e268820952c8a80f2e3 (diff) | |
download | core-1cbe3d944a93fa3a0f0d7a444bb69c644c83f385.tar.gz core-1cbe3d944a93fa3a0f0d7a444bb69c644c83f385.tar.bz2 core-1cbe3d944a93fa3a0f0d7a444bb69c644c83f385.zip |
SANITIZE_TARGET: set global ASAN_OPTIONS
allow_user_segv_handler=1 is required to run ART under ASan
detect_odr_violation=0 and alloc_dealloc_mismatch=0 suppress some of
the existing bug reports during boot.
Bug: 21951850, 21785137
Change-Id: I4d36967c6d8d936dacbfdf1b94b87fa94766bd3e
Diffstat (limited to 'rootdir/Android.mk')
-rw-r--r-- | rootdir/Android.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 7ab76b871..05d8fe08c 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -30,6 +30,11 @@ LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \ include $(BUILD_SYSTEM)/base_rules.mk +EXPORT_GLOBAL_ASAN_OPTIONS := +ifeq (address,$(strip $(SANITIZE_TARGET))) + EXPORT_GLOBAL_ASAN_OPTIONS := export ASAN_OPTIONS allow_user_segv_handler=1:detect_odr_violation=0:alloc_dealloc_mismatch=0 +endif + # Regenerate init.environ.rc if PRODUCT_BOOTCLASSPATH has changed. bcp_md5 := $(word 1, $(shell echo $(PRODUCT_BOOTCLASSPATH) $(PRODUCT_SYSTEM_SERVER_CLASSPATH) | $(MD5SUM))) bcp_dep := $(intermediates)/$(bcp_md5).bcp.dep @@ -41,6 +46,7 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/init.environ.rc.in $(bcp_dep) @mkdir -p $(dir $@) $(hide) sed -e 's?%BOOTCLASSPATH%?$(PRODUCT_BOOTCLASSPATH)?g' $< >$@ $(hide) sed -i -e 's?%SYSTEMSERVERCLASSPATH%?$(PRODUCT_SYSTEM_SERVER_CLASSPATH)?g' $@ + $(hide) sed -i -e 's?%EXPORT_GLOBAL_ASAN_OPTIONS%?$(EXPORT_GLOBAL_ASAN_OPTIONS)?g' $@ bcp_md5 := bcp_dep := |