From ee93e6ea0d8ebaf2c383a8b4fc7061117018b780 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 6 Dec 2022 13:18:11 +0800 Subject: [PATCH] boards/sim: Decouple CONFIG_MM_UBSAN_ALL from CONFIG_MM_UBSAN_ALL like other arch(e.g. arch/arm/src/common/Toolchain.defs) Signed-off-by: Xiang Xiao --- boards/sim/sim/sim/scripts/Make.defs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 686d2dd660..e501b6f340 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -79,8 +79,11 @@ endif ifeq ($(CONFIG_SIM_UBSAN),y) ARCHOPTIMIZATION += -fsanitize=undefined -else ifeq ($(CONFIG_MM_UBSAN_ALL),y) - ARCHOPTIMIZATION += $(CONFIG_MM_UBSAN_OPTION) +else + ifeq ($(CONFIG_MM_UBSAN_ALL),y) + ARCHOPTIMIZATION += $(CONFIG_MM_UBSAN_OPTION) + endif + ifeq ($(CONFIG_MM_UBSAN_TRAP_ON_ERROR),y) ARCHOPTIMIZATION += -fsanitize-undefined-trap-on-error endif