cmake: Correctly split/gc sections while linking
Repeat the flags while linking for LTO
This commit is contained in:
parent
4412881439
commit
0ac4130b7d
|
|
@ -267,7 +267,7 @@ if(CMAKE_CROSSCOMPILING)
|
|||
|
||||
# split and gc sections
|
||||
add_compile_options(-ffunction-sections -fdata-sections)
|
||||
add_link_options(-Wl,--gc-sections)
|
||||
add_link_options(-ffunction-sections -fdata-sections -Wl,--gc-sections)
|
||||
|
||||
# LTO (with custom options)
|
||||
add_compile_options(-flto -fno-fat-lto-objects)
|
||||
|
|
|
|||
Loading…
Reference in New Issue