Skip to content

Commit 7a7cfd0

Browse files
cvinayakdleach02
authored andcommitted
cmake: gcc/ld: Fix LTO warnings
Fix the following warnings: [255/261] Linking C executable zephyr/zephyr_pre0.elf lto-wrapper: warning: using serial compilation of 8 LTRANS jobs lto-wrapper: note: see the '-flto' option documentation for more information [260/261] Linking C executable zephyr/zephyr.elf lto-wrapper: warning: using serial compilation of 8 LTRANS jobs lto-wrapper: note: see the '-flto' option documentation for more information Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 31fea97 commit 7a7cfd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmake/compiler/gcc/compiler_flags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set_compiler_property(PROPERTY optimization_size -Os)
2323
set_compiler_property(PROPERTY optimization_size_aggressive -Oz)
2424

2525
if(CMAKE_C_COMPILER_VERSION GREATER_EQUAL "4.5.0")
26-
set_compiler_property(PROPERTY optimization_lto -flto)
26+
set_compiler_property(PROPERTY optimization_lto -flto=auto)
2727
set_compiler_property(PROPERTY prohibit_lto -fno-lto)
2828
endif()
2929

cmake/linker/ld/linker_flags.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endif()
3636

3737
set_property(TARGET linker PROPERTY partial_linking "-r")
3838

39-
set_property(TARGET linker PROPERTY lto_arguments -flto -fno-ipa-sra -ffunction-sections -fdata-sections)
39+
set_property(TARGET linker PROPERTY lto_arguments -flto=auto -fno-ipa-sra -ffunction-sections -fdata-sections)
4040

4141
check_set_linker_property(TARGET linker PROPERTY no_relax ${LINKERFLAGPREFIX},--no-relax)
4242

0 commit comments

Comments
 (0)