From 60beecc90ca5685a867eb06d6f73d2bac315ec55 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Fri, 18 Jan 2019 13:53:52 -0800 Subject: [PATCH] Limit 2 uses of SANITIZE_TARGET to ASan. These two places are checking for ifdef(SANITIZE_TARGET) but what they are really looking for is the second stage of ASan build. Fix the checks so that they do not apply to HWASan. I have not seen any change in behavior, but there are some new files under /system in hwasan build that were not there before, and things keep working in general, so this feels like the right move. Bug: 112438058 Test: none; SANITIZE_TARGET=hwaddress keeps working Change-Id: I4544f408263b908be6ef4a47dd2b5c937e0c1f33 --- core/Makefile | 2 +- core/install_jni_libs_internal.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 7d1c7ff20d..2ffb502f95 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3658,7 +3658,7 @@ ifneq ($(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ODM_BASE_FS_PATH),) $(hide) cp $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ODM_BASE_FS_PATH) \ $(zip_root)/META/$(notdir $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ODM_BASE_FS_PATH)) endif -ifneq ($(strip $(SANITIZE_TARGET)),) +ifneq (,$(filter address, $(SANITIZE_TARGET))) # We need to create userdata.img with real data because the instrumented libraries are in userdata.img. $(hide) echo "userdata_img_with_data=true" >> $(zip_root)/META/misc_info.txt endif diff --git a/core/install_jni_libs_internal.mk b/core/install_jni_libs_internal.mk index e786691656..e0f1ad4b80 100644 --- a/core/install_jni_libs_internal.mk +++ b/core/install_jni_libs_internal.mk @@ -57,7 +57,7 @@ ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(my_installed_library) # Create symlink in the app specific lib path # Skip creating this symlink when running the second part of a target sanitization build. -ifndef SANITIZE_TARGET +ifeq ($(filter address,$(SANITIZE_TARGET)),) ifdef LOCAL_POST_INSTALL_CMD # Add a shell command separator LOCAL_POST_INSTALL_CMD += ;