mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Use LTCG on Windows for two targets only.
This commit is contained in:
@@ -1601,6 +1601,17 @@ if (WIN32)
|
||||
/DELAYLOAD:wtsapi32.dll
|
||||
/DELAYLOAD:propsys.dll
|
||||
)
|
||||
|
||||
if (NOT build_win64 AND DESKTOP_APP_SPECIAL_TARGET)
|
||||
target_compile_options(Telegram
|
||||
PRIVATE
|
||||
$<IF:$<CONFIG:Debug>,,/GL>
|
||||
)
|
||||
target_link_options(Telegram
|
||||
PRIVATE
|
||||
$<IF:$<CONFIG:Debug>,,/LTCG>
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_prepare_qrc(Telegram)
|
||||
|
@@ -34,6 +34,14 @@ PUBLIC
|
||||
desktop-app::lib_tl
|
||||
)
|
||||
|
||||
if (WIN32 AND NOT build_win64 AND DESKTOP_APP_SPECIAL_TARGET)
|
||||
target_compile_options(td_scheme
|
||||
PRIVATE
|
||||
$<IF:$<CONFIG:Debug>,,/GL>
|
||||
)
|
||||
set_property(TARGET td_scheme APPEND_STRING PROPERTY STATIC_LIBRARY_OPTIONS "$<IF:$<CONFIG:Debug>,,/LTCG>")
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "mips64")
|
||||
# Sometimes final linking may fail with error "relocation truncated to fit"
|
||||
# due to large scheme size.
|
||||
|
2
cmake
2
cmake
Submodule cmake updated: f5dab7d4b7...125b9571c5
Reference in New Issue
Block a user