mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-02 18:10:57 +02:00
change(xtensa): Add -mno-target-align to size-optimized builds
Saves space, about 6K in our application Merges https://github.com/espressif/esp-idf/pull/15677
This commit is contained in:
committed by
BOT
parent
6e0fd570b2
commit
e2e51c08f6
@@ -23,6 +23,9 @@ if(BOOTLOADER_BUILD)
|
|||||||
endif()
|
endif()
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
list(APPEND compile_options "-freorder-blocks")
|
list(APPEND compile_options "-freorder-blocks")
|
||||||
|
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
|
||||||
|
list(APPEND compile_options "-mno-target-align")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
|
elseif(CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG)
|
||||||
list(APPEND compile_options "-Og")
|
list(APPEND compile_options "-Og")
|
||||||
@@ -52,6 +55,9 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||||
list(APPEND compile_options "-freorder-blocks")
|
list(APPEND compile_options "-freorder-blocks")
|
||||||
|
if(CONFIG_IDF_TARGET_ARCH_XTENSA)
|
||||||
|
list(APPEND compile_options "-mno-target-align")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
|
elseif(CONFIG_COMPILER_OPTIMIZATION_DEBUG)
|
||||||
list(APPEND compile_options "-Og")
|
list(APPEND compile_options "-Og")
|
||||||
|
Reference in New Issue
Block a user