From 125b9571c58186d7190fb12a54a70493d4722627 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 6 Dec 2022 18:11:17 +0400 Subject: [PATCH] Remove global LTCG on Windows build (object too large). --- init_target.cmake | 3 --- options_win.cmake | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/init_target.cmake b/init_target.cmake index 47e127b..4af214c 100644 --- a/init_target.cmake +++ b/init_target.cmake @@ -39,9 +39,6 @@ function(init_target target_name) # init_target(my_target folder_name) XCODE_ATTRIBUTE_LLVM_LTO $,NO,YES> ) endif() - if (DESKTOP_APP_SPECIAL_TARGET AND WIN32 AND NOT build_win64) - set_property(TARGET ${target_name} APPEND_STRING PROPERTY STATIC_LIBRARY_OPTIONS "$,,/LTCG>") - endif() endfunction() # This code is not supposed to run on build machine, only on target machine. diff --git a/options_win.cmake b/options_win.cmake index 136afa3..b2eeefa 100644 --- a/options_win.cmake +++ b/options_win.cmake @@ -53,16 +53,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") INTERFACE /LARGEADDRESSAWARE # Allow more than 2 GB in 32 bit application. ) - if (DESKTOP_APP_SPECIAL_TARGET) - target_compile_options(common_options - INTERFACE - $,,/GL> - ) - target_link_options(common_options - INTERFACE - $,,/LTCG> - ) - endif() endif() elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_definitions(common_options