mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
build system: add COMPILER_SAVE_RESTORE_LIBCALLS option
Add new Kconfig option to enable -msave-restore flag for RISC-V targets. This option can be used to reduce binary size by replacing inlined register save/restore sequences with library calls.
This commit is contained in:
@@ -61,6 +61,10 @@ else()
|
||||
list(APPEND link_options "-fno-rtti") # used to invoke correct multilib variant (no-rtti) during linking
|
||||
endif()
|
||||
|
||||
if(CONFIG_COMPILER_SAVE_RESTORE_LIBCALLS)
|
||||
list(APPEND compile_options "-msave-restore")
|
||||
endif()
|
||||
|
||||
if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS)
|
||||
list(APPEND compile_options "-Wno-parentheses"
|
||||
"-Wno-sizeof-pointer-memaccess"
|
||||
|
||||
Reference in New Issue
Block a user