From: Ivan Grokhotkov Date: Thu, 20 Oct 2016 08:10:51 +0000 (+0800) Subject: build system: use -Og instead of -O0 for debug builds, expand help text in menuconfig X-Git-Tag: v1.0~112^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39a06319e245b7b4bd9ec5f8dbfe12d00a1c7940;p=esp-idf build system: use -Og instead of -O0 for debug builds, expand help text in menuconfig --- diff --git a/Kconfig b/Kconfig index 936181a9cb..97da1f01f5 100644 --- a/Kconfig +++ b/Kconfig @@ -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 diff --git a/make/project.mk b/make/project.mk index 9088eda85d..b646dfc419 100644 --- a/make/project.mk +++ b/make/project.mk @@ -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