Add CONFIG_NDEBUG Kconfig to control NDEBUG definition

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-02-03 03:47:49 +08:00 committed by David Sidrane
parent 8defb843aa
commit d056834605
2 changed files with 7 additions and 0 deletions

View file

@ -557,6 +557,10 @@ endmenu # Customize Header Files
menu "Debug Options"
config NDEBUG
bool "Define NDEBUG globally"
default y
config DEBUG_ALERT
bool
default n

View file

@ -535,6 +535,9 @@ endef
# ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
ARCHDEFINES += ${shell $(DEFINE) "$(CC)" __NuttX__}
ifeq ($(CONFIG_NDEBUG),y)
ARCHDEFINES += ${shell $(DEFINE) "$(CC)" NDEBUG}
endif
# The default C/C++ search path