Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed LTO builds failing due to incorrect flags. #5451

Merged
merged 1 commit into from Jun 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions lang/CMakeLists.txt
Expand Up @@ -339,10 +339,14 @@ target_link_libraries(sclang ${ICU_LIBRARIES})
target_compile_definitions(sclang PUBLIC USE_SC_TERMINAL_CLIENT)

if(LTO)
target_compile_definitions(libsclang PUBLIC -flto -flto-report)

set_property(TARGET sclang libsclang
APPEND PROPERTY COMPILE_FLAGS "-flto -flto-report")

set_property(TARGET sclang
APPEND PROPERTY LINK_FLAGS "-flto -flto-report -fwhole-program")

set_property(TARGET libsclang
APPEND PROPERTY LINK_FLAGS "-flto -flto-report")
endif()

if(APPLE)
Expand Down