boards/sim: Decouple CONFIG_MM_UBSAN_ALL from CONFIG_MM_UBSAN_ALL
like other arch(e.g. arch/arm/src/common/Toolchain.defs)
@@ -79,8 +79,11 @@ endif
ifeq ($(CONFIG_SIM_UBSAN),y)
ARCHOPTIMIZATION += -fsanitize=undefined
-else ifeq ($(CONFIG_MM_UBSAN_ALL),y)
+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
