diff options
author | Florian Mayer <fmayer@google.com> | 2023-06-07 15:02:22 -0700 |
---|---|---|
committer | Florian Mayer <fmayer@google.com> | 2023-06-13 20:14:50 +0000 |
commit | 0f79319bb8318077a86cc7e090364b1a70cbeba5 (patch) | |
tree | cd3f0b88ea88d7efb44b131f931894869f0ac809 | |
parent | d833e73b8b8a700c82dc1449597013ed774a88c4 (diff) | |
download | build-0f79319bb8318077a86cc7e090364b1a70cbeba5.tar.gz |
Fix bug when memtag_heap in diag but not sanitizers
Without this we get:
unsupported argument 'memtag_heap' to option '-fno-sanitize-trap='
(cherry picked from https://android-review.googlesource.com/q/commit:2a6762605574d6fbcea63e9d5e18d184e241417d)
Bug: 286415307
Merged-In: Iaeb23d0f4962bb3d788036fadc14b9420221a38e
Change-Id: Iaeb23d0f4962bb3d788036fadc14b9420221a38e
-rw-r--r-- | core/config_sanitizers.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 0e84f51647..ebce4c2a4e 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -249,6 +249,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)) |