build system: use -Og instead of -O0 for debug builds, expand help text in menuconfig

This commit is contained in:
Ivan Grokhotkov 2016-10-20 16:10:51 +08:00
parent 34fa6a60a9
commit 39a06319e2
2 changed files with 5 additions and 2 deletions

View File

@ -27,7 +27,10 @@ choice OPTIMIZATION_LEVEL
prompt "Optimization level"
default OPTIMIZATION_LEVEL_DEBUG
help
This option sets compiler optimization level.
This option sets optimization level.
For "Release" setting, -Os flag is added to CFLAGS,
and -DNDEBUG flag is added to CPPFLAGS.
For "Debug" setting, -Og flag is added to CFLAGS.
config OPTIMIZATION_LEVEL_DEBUG
bool "Debug"
config OPTIMIZATION_LEVEL_RELEASE

View File

@ -179,7 +179,7 @@ ifneq ("$(CONFIG_OPTIMIZATION_LEVEL_RELEASE)","")
OPTIMIZATION_FLAGS = -Os
CPPFLAGS += -DNDEBUG
else
OPTIMIZATION_FLAGS = -O0
OPTIMIZATION_FLAGS = -Og
endif
# Enable generation of debugging symbols