if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
list(APPEND compile_options "-Os")
+ list(APPEND compile_options "-freorder-blocks")
else()
list(APPEND compile_options "-Og")
endif()
add_subdirectory(${dir} ${_name})
endif()
set(__idf_component_context 0)
-endforeach()
\ No newline at end of file
+endforeach()
# 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