Enable LTO support for Chatterino builds (#4258)
This is disabled by default, and can be enabled by passing `-DCHATTERINO_LTO=On` to your cmake invocation.
This commit is contained in:
@@ -665,6 +665,12 @@ if (BUILD_APP)
|
||||
DESTINATION share/icons/hicolor/256x256/apps
|
||||
)
|
||||
endif ()
|
||||
|
||||
if(CHATTERINO_ENABLE_LTO)
|
||||
message(STATUS "Enabling LTO for ${EXECUTABLE_PROJECT}")
|
||||
set_property(TARGET ${EXECUTABLE_PROJECT}
|
||||
PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (USE_PRECOMPILED_HEADERS)
|
||||
@@ -843,3 +849,9 @@ else ()
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(CHATTERINO_ENABLE_LTO)
|
||||
message(STATUS "Enabling LTO for ${LIBRARY_PROJECT}")
|
||||
set_property(TARGET ${LIBRARY_PROJECT}
|
||||
PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user