summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-16 10:43:18 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-16 10:43:18 +0200
commit7df2af70b994abc56f9178128e5d7549f04b712b (patch)
tree33af58436c3e9afa989976fc7189abcfc4f26ed8
parentc69a09c693fc390f0e85de17ffede0809be89d9e (diff)
downloadtmwa-7df2af70b994abc56f9178128e5d7549f04b712b.tar.gz
tmwa-7df2af70b994abc56f9178128e5d7549f04b712b.tar.bz2
tmwa-7df2af70b994abc56f9178128e5d7549f04b712b.tar.xz
tmwa-7df2af70b994abc56f9178128e5d7549f04b712b.zip
CMake: Change -flto to -flto=auto to speed up linkingHEADmaster
And suppress a related warning: lto-wrapper: warning: using serial compilation of <N> LTRANS jobs
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16e251c..5d550f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,10 +72,10 @@ include_directories(include)
# FIXME this is currently broken
#set(CMAKE_CXX_VISIBILITY_PRESET hidden)
# General purpose build flags.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fstack-protector -fno-strict-aliasing -flto")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -fstack-protector -fno-strict-aliasing -flto=auto")
# Enable link time optimization, and track function and data sections. We let
# the linker remove unused code.
-#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -ffunction-sections -fdata-sections -Wl,--gc-sections")
+#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=auto -ffunction-sections -fdata-sections -Wl,--gc-sections")
# Next, add warnings
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
# Add debug information