From 7516fe7eae06e5fe72a54df914831ab09acd5859 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Thu, 23 May 2024 11:01:15 +0200 Subject: [PATCH] [Lib/Optimizations] fix logic error in lto handling Also fix indentation --- lib/optimizations.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/optimizations.nix b/lib/optimizations.nix index a599a84..8b0ef4e 100644 --- a/lib/optimizations.nix +++ b/lib/optimizations.nix @@ -30,7 +30,7 @@ let ltoFlags = { threads ? 1, thin ? false }: [ # Fat LTO objects are object files that contain both the intermediate language and the object code. This makes them usable for both LTO linking and normal linking. "-flto=${toString threads}" # Use -flto=auto to use GNU make’s job server, if available, or otherwise fall back to autodetection of the number of CPU threads present in your system. - (optionalString thin "-ffat-lto-objects") + (optionalString (!thin) "-ffat-lto-objects") "-fuse-linker-plugin" # Stream extra information needed for aggressive devirtualization when running the link-time optimizer in local transformation mode. @@ -380,10 +380,10 @@ rec { lastLevel = lastLevelCache; }); CXXFLAGS = CFLAGS; - CPPFLAGS = [ ] - ++ optionals (levelN >= 1) genericPreprocessorFlags; - LDFLAGS = [ ] - ++ optionals (levelN >= 3) genericLinkerFlags; + CPPFLAGS = [] + ++ optionals (levelN >= 1) genericPreprocessorFlags; + LDFLAGS = [] + ++ optionals (levelN >= 3) genericLinkerFlags; preConfigure = ''