mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(build_system): disable shrink-wrapping in Og builds to reduce binary size
This commit is contained in:
parent
33d9fd629d
commit
47a902c813
@ -22,6 +22,9 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
endif()
|
endif()
|
||||||
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
|
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
|
||||||
list(APPEND compile_options "-Og")
|
list(APPEND compile_options "-Og")
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
|
||||||
|
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
|
||||||
|
endif()
|
||||||
elseif(CONFIG_COMPILER_OPTIMIZATION_NONE)
|
elseif(CONFIG_COMPILER_OPTIMIZATION_NONE)
|
||||||
list(APPEND compile_options "-O0")
|
list(APPEND compile_options "-O0")
|
||||||
elseif(CONFIG_COMPILER_OPTIMIZATION_PERF)
|
elseif(CONFIG_COMPILER_OPTIMIZATION_PERF)
|
||||||
@ -37,6 +40,9 @@ else() # BOOTLOADER_BUILD
|
|||||||
endif()
|
endif()
|
||||||
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
|
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
|
||||||
list(APPEND compile_options "-Og")
|
list(APPEND compile_options "-Og")
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CONFIG_IDF_TARGET_LINUX)
|
||||||
|
list(APPEND compile_options "-fno-shrink-wrap") # Disable shrink-wrapping to reduce binary size
|
||||||
|
endif()
|
||||||
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE)
|
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE)
|
||||||
list(APPEND compile_options "-O0")
|
list(APPEND compile_options "-O0")
|
||||||
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
|
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF)
|
||||||
|
Loading…
Reference in New Issue
Block a user