buildsystem: Enable LTO also for the application
It turns out that currently LTO is enabled only for the kernel. This commit updates it to enable it for the whole application and adds additional LTO exclusions required for the standard C libraries to build and link properly. Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
46484da502
commit
118f1592ff
3 changed files with 7 additions and 1 deletions
|
@ -214,7 +214,7 @@ endif()
|
|||
zephyr_compile_options(${OPTIMIZATION_FLAG})
|
||||
|
||||
if(CONFIG_LTO)
|
||||
add_compile_options($<TARGET_PROPERTY:compiler,optimization_lto>)
|
||||
zephyr_compile_options($<TARGET_PROPERTY:compiler,optimization_lto>)
|
||||
add_link_options($<TARGET_PROPERTY:linker,lto_arguments>)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue