From 8d77203f6a3539ce02efcbd823f619092a1cd68b Mon Sep 17 00:00:00 2001 From: Aidan Case Date: Thu, 14 Mar 2024 22:32:45 -0500 Subject: [PATCH] try building with lto --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35571013a1..64a5a20ec6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,6 +284,10 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP set(CMAKE_CXX_ARCHIVE_APPEND " rUT ") set(CMAKE_C_ARCHIVE_APPEND " rUT ") endif() + # Maybe size reduction at cost of compile times? + if(FLATPAK) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) + endif() endif() # Bit of a hack for flatpak building: compress the debug info with zstd to save space in CI