PKGBUILDs/community/rspamd/0001-LTO-check.patch
2019-11-21 00:58:47 +00:00

25 lines
869 B
Diff

From 1972a6f4ae4d718821488f45444843bfdf0c1075 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Wed, 20 Nov 2019 17:54:49 -0700
Subject: [PATCH] LTO check
---
cmake/Toolset.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/Toolset.cmake b/cmake/Toolset.cmake
index b6c863521..84bb07cba 100644
--- a/cmake/Toolset.cmake
+++ b/cmake/Toolset.cmake
@@ -149,7 +149,7 @@ elseif (CMAKE_BUILD_TYPE_UC MATCHES "RELEASE")
cmake_policy (SET CMP0069 NEW)
include (CheckIPOSupported)
check_ipo_supported (RESULT SUPPORT_LTO OUTPUT LTO_DIAG )
- if (SUPPORT_LTO)
+ if (SUPPORT_LTO AND ENABLE_OPTIMIZATION MATCHES "ON")
set (CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
message (STATUS "Enable IPO for the ${CMAKE_BUILD_TYPE} build")
else ()
--
2.23.0