From 209adacf5aa9dd97eed9923032af71a9f4adab9a Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 21 Oct 2020 06:08:20 +1000 Subject: [PATCH] optimisation: disable LTO partitioning on GCC This dramatically decreases link times. --- nc_optimisation.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nc_optimisation.cmake b/nc_optimisation.cmake index a8dd1c4..6f042b6 100644 --- a/nc_optimisation.cmake +++ b/nc_optimisation.cmake @@ -38,7 +38,9 @@ if (LTO) append_compile_flag("-flto-odr-type-merging") # GCC: Attempt to use a more aggressive whole-program style of LTO - append_compile_flag("-flto-partition=none") + # NOTE: It's unclear if this _actually_ buys us performance or if it just + # slows down linking (by a substantial factor). + #append_compile_flag("-flto-partition=none") # Throw in some optimisation flags that are LTO specific. We don't # particularly care about checking Debug/Release here because LTO is