]> granicus.if.org Git - esp-idf/commitdiff
build_system: add -freorder-blocks option for release config
authorDmitry Plotnikov <plotnikov@espressif.com>
Thu, 4 Jul 2019 07:02:20 +0000 (11:02 +0400)
committerbot <bot@espressif.com>
Sat, 27 Jul 2019 09:28:19 +0000 (09:28 +0000)
CMakeLists.txt
make/project.mk

index 1b48106487993d82b23ea2632bed6ef010e98d56..a0ef70d15f1cae109d57bdd15f77c8bd9b549c52 100644 (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()
@@ -79,4 +80,4 @@ foreach(component_target ${build_component_targets})
         add_subdirectory(${dir} ${_name})
     endif()
     set(__idf_component_context 0)
-endforeach()
\ No newline at end of file
+endforeach()
index 32d8862e4f249ad6209faaf03a1ab9252a239260..e146acc42f7727e2c5a38a20e9315b6d82eec275 100644 (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