xtensa: enable -Oz for xtensa to reduce codesize

This commit is contained in:
hanqiyuan 2023-08-20 22:36:56 +08:00 committed by Xiang Xiao
parent adf9e685ab
commit 1a832eb554
2 changed files with 6 additions and 2 deletions

View File

@ -307,7 +307,7 @@ config XTENSA_TOOLCHAIN_XCC
config XTENSA_TOOLCHAIN_XCLANG
bool "Xtensa Toolchain use CLANG as front end"
select ARCH_TOOLCHAIN_GNU
select ARCH_TOOLCHAIN_CLANG
config XTENSA_TOOLCHAIN_ESP
bool "ESP toolchain for xtensa"

View File

@ -58,7 +58,11 @@ endif
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
ARCHOPTIMIZATION += -Os
ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
ARCHOPTIMIZATION += -Oz
else
ARCHOPTIMIZATION += -Os
endif
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)