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.
This commit is contained in:
Ivan Grokhotkov
2016-10-17 12:38:17 +08:00
parent bdd67c98d6
commit 182184567e
4 changed files with 45 additions and 13 deletions

View File

@@ -284,7 +284,7 @@ static inline void heap_swap(int i, int j)
}
#endif //BOOTLOADER_BUILD
inline IRAM_ATTR uint32_t esp_log_early_timestamp()
IRAM_ATTR uint32_t esp_log_early_timestamp()
{
return xthal_get_ccount() / (CPU_CLK_FREQ_ROM / 1000);
}