Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmake/DaemonFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,13 @@ else()
# Saigo NaCl compiler doesn't support LTO, the flag is accepted but linking fails
# with “unable to pass LLVM bit-code files to linker” error.
if (USE_LTO AND NOT NACL)
try_c_cxx_flag(LTO "-flto")
try_c_cxx_flag(LTO_AUTO "-flto=auto")

if (FLAG_LTO)
if (NOT FLAG_LTO_AUTO)
try_c_cxx_flag(LTO "-flto")
endif()

if (FLAG_LTO_AUTO OR FLAG_LTO)
# Pass all compile flags to the linker.
set_linker_flag("${CMAKE_CXX_FLAGS}")

Expand Down