From 700a46e5db552ab1ee61ad52ba45171410b6ec56 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 14 Oct 2022 09:43:02 +0400 Subject: [PATCH] Fix LTO in debug build --- options_linux.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/options_linux.cmake b/options_linux.cmake index 457a79e..4dd62f0 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -62,7 +62,6 @@ if (NOT DESKTOP_APP_USE_PACKAGED) target_link_options(common_options INTERFACE -rdynamic - -fwhole-program ) endif() @@ -74,6 +73,8 @@ if (NOT DESKTOP_APP_USE_PACKAGED OR DESKTOP_APP_SPECIAL_TARGET) ) target_link_options(common_options INTERFACE + $<$:-fno-use-linker-plugin> + $<$>:-fwhole-program> -Wl,-z,relro -Wl,-z,now # -pie # https://gitlab.gnome.org/GNOME/nautilus/-/issues/1601