Merge "Fix evaluation order of (Cfi|Memtag) exclude paths."
This commit is contained in:
@@ -120,13 +120,18 @@ 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)
|
||||
|
||||
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
|
||||
endif
|
||||
|
||||
# Enable memtag_heap in included paths (for Arm64 only).
|
||||
ifeq ($(filter memtag_heap, $(my_sanitize)),)
|
||||
@@ -135,7 +140,11 @@ ifeq ($(filter memtag_heap, $(my_sanitize)),)
|
||||
$(PRODUCT_MEMTAG_HEAP_SYNC_INCLUDE_PATHS)
|
||||
combined_async_include_paths := $(MEMTAG_HEAP_ASYNC_INCLUDE_PATHS) \
|
||||
$(PRODUCT_MEMTAG_HEAP_ASYNC_INCLUDE_PATHS)
|
||||
combined_exclude_paths := $(MEMTAG_HEAP_EXCLUDE_PATHS) \
|
||||
$(PRODUCT_MEMTAG_HEAP_EXCLUDE_PATHS)
|
||||
|
||||
ifeq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_exclude_paths)),\
|
||||
$(filter $(dir)%,$(LOCAL_PATH)))),)
|
||||
ifneq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_sync_include_paths)),\
|
||||
$(filter $(dir)%,$(LOCAL_PATH)))),)
|
||||
my_sanitize := memtag_heap $(my_sanitize)
|
||||
@@ -146,6 +155,7 @@ ifeq ($(filter memtag_heap, $(my_sanitize)),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# If CFI is disabled globally, remove it from my_sanitize.
|
||||
ifeq ($(strip $(ENABLE_CFI)),false)
|
||||
|
Reference in New Issue
Block a user