Merge "Fix bug when memtag_heap in diag but not sanitizers" into udc-dev am: ffd1290cc9

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/23678238

Change-Id: Ia6acfda4027a88c593f0bb6f903a94ad2948f2d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Florian Mayer 2023-06-20 20:23:41 +00:00 committed by Automerger Merge Worker
commit 824884e4a5

View file

@ -253,6 +253,13 @@ ifneq ($(filter memtag_heap memtag_stack,$(my_sanitize)),)
endif
endif
# Ignore SANITIZE_TARGET_DIAG=memtag_heap without SANITIZE_TARGET=memtag_heap
# This can happen if a condition above filters out memtag_heap from
# my_sanitize. It is easier to handle all of these cases here centrally.
ifneq ($(filter memtag_heap,$(my_sanitize_diag)),)
my_sanitize_diag := $(filter-out memtag_heap,$(my_sanitize_diag))
endif
ifneq ($(filter memtag_heap,$(my_sanitize)),)
my_cflags += -fsanitize=memtag-heap
my_sanitize := $(filter-out memtag_heap,$(my_sanitize))