From 064d91c49ba059dea8f6e980871a3e2e68c0af61 Mon Sep 17 00:00:00 2001 From: Elvis Chien Date: Wed, 14 Apr 2021 17:02:29 +0800 Subject: [PATCH] Allow PRODUCT_CFI_INCLUDE_PATHS to work with 32-bit builds CFI has been enabled for 32-bit builds but this option still only works for 64-bit builds Bug: 179233410 Change-Id: I3a9fed728489021f6c062ad45082b0a2705cec51 --- core/config_sanitizers.mk | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index f9042c290b..90f00c0e08 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -115,20 +115,18 @@ ifeq ($(LOCAL_SANITIZE),never) my_sanitize_diag := endif -# Enable CFI in included paths (for Arm64 only). +# Enable CFI in included paths. ifeq ($(filter cfi, $(my_sanitize)),) - ifneq ($(filter arm64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)),) - combined_include_paths := $(CFI_INCLUDE_PATHS) \ - $(PRODUCT_CFI_INCLUDE_PATHS) - combined_exclude_paths := $(CFI_EXCLUDE_PATHS) \ - $(PRODUCT_CFI_EXCLUDE_PATHS) + combined_include_paths := $(CFI_INCLUDE_PATHS) \ + $(PRODUCT_CFI_INCLUDE_PATHS) + combined_exclude_paths := $(CFI_EXCLUDE_PATHS) \ + $(PRODUCT_CFI_EXCLUDE_PATHS) - ifneq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_include_paths)),\ - $(filter $(dir)%,$(LOCAL_PATH)))),) - ifeq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_exclude_paths)),\ - $(filter $(dir)%,$(LOCAL_PATH)))),) - my_sanitize := cfi $(my_sanitize) - endif + ifneq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_include_paths)),\ + $(filter $(dir)%,$(LOCAL_PATH)))),) + ifeq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_exclude_paths)),\ + $(filter $(dir)%,$(LOCAL_PATH)))),) + my_sanitize := cfi $(my_sanitize) endif endif endif