mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
build_system: add -freorder-blocks option for release config
This commit is contained in:
@@ -11,6 +11,7 @@ unset(compile_definitions)
|
|||||||
|
|
||||||
if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
|
if(CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE)
|
||||||
list(APPEND compile_options "-Os")
|
list(APPEND compile_options "-Os")
|
||||||
|
list(APPEND compile_options "-freorder-blocks")
|
||||||
else()
|
else()
|
||||||
list(APPEND compile_options "-Og")
|
list(APPEND compile_options "-Og")
|
||||||
endif()
|
endif()
|
||||||
|
@@ -418,7 +418,7 @@ endif
|
|||||||
|
|
||||||
# Optimization flags are set based on menuconfig choice
|
# Optimization flags are set based on menuconfig choice
|
||||||
ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE
|
ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE
|
||||||
OPTIMIZATION_FLAGS = -Os
|
OPTIMIZATION_FLAGS = -Os -freorder-blocks
|
||||||
else
|
else
|
||||||
OPTIMIZATION_FLAGS = -Og
|
OPTIMIZATION_FLAGS = -Og
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user