From 933e0661188d304bf68fde4f6552c93f9ae7931b Mon Sep 17 00:00:00 2001 From: wangyongrong Date: Fri, 12 Apr 2024 12:42:25 +0800 Subject: [PATCH] common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64 Signed-off-by: wangyongrong --- arch/x86_64/src/common/Toolchain.defs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/src/common/Toolchain.defs b/arch/x86_64/src/common/Toolchain.defs index 9cc456593e535..fb4b4a93d3a6f 100644 --- a/arch/x86_64/src/common/Toolchain.defs +++ b/arch/x86_64/src/common/Toolchain.defs @@ -41,7 +41,9 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL) endif -ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) +ifeq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O0 +else ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) else ifeq ($(CONFIG_DEBUG_FULLOPT),y) ARCHOPTIMIZATION += -Os