Merge branch 'feature/gcc_reorder_blocks' into 'master'

build system: add -freorder-blocks option for release config

See merge request espressif/esp-idf!3990
This commit is contained in:
Angus Gratton
2019-07-29 10:16:49 +08:00
2 changed files with 3 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ unset(compile_definitions)
if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
list(APPEND compile_options "-Os")
list(APPEND compile_options "-freorder-blocks")
else()
list(APPEND compile_options "-Og")
endif()

View File

@@ -418,7 +418,7 @@ endif
# Optimization flags are set based on menuconfig choice
ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE
OPTIMIZATION_FLAGS = -Os
OPTIMIZATION_FLAGS = -Os -freorder-blocks
else
OPTIMIZATION_FLAGS = -Og
endif