]> granicus.if.org Git - esp-idf/commit
build system: add menuconfig choice for optimization level, reorganize C*FLAGS
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 17 Oct 2016 04:38:17 +0000 (12:38 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 17 Oct 2016 04:38:17 +0000 (12:38 +0800)
commit182184567e1939a56aeef325e0846cc3b364d9f8
tree74473f4386aa06aeee46bc44adcc93f6b16aeb07
parentbdd67c98d6b4dc298334ea7bf179f6bf63b37eaf
build system: add menuconfig choice for optimization level, reorganize C*FLAGS

This change adds two options (Debug/Release) for optimization level.
Debug enables -O0, release enables -Os and adds -DNDEBUG (which removes all assert() statements).
Debugging symbols are kept in both cases, although we may add an option to strip output file if necessary.
Also we used to define all common compiler flags in CPPFLAGS, and then appended them to CFLAGS/CXXFLAGS.
It makes it impossible to add preprocessor macros to CPPFLAGS at component level (one has to use CFLAGS/CXXFLAGS instead).
Some third party libraries are not compatible with this approach. Changed to the more common way of using these variables.
Kconfig
components/log/log.c
make/component_common.mk
make/project.mk