[vlc-devel] [PATCH] [RFC] Configure: enable LTO if present

Jean-Baptiste Kempf jb at videolan.org
Mon Jul 31 23:41:50 CEST 2017


---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index e303715514..fe7e273ea0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1049,6 +1049,12 @@ AS_IF([test "${enable_optimizations}" != "no"], [
   RDC_PROG_CXX_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
   AC_LANG_POP
 
+  dnl Check for LTO
+  RDC_PROG_CC_FFLAGS([lto])
+  AC_LANG_PUSH(C++)
+  RDC_PROG_CXX_FFLAGS([lto])
+  AC_LANG_POP
+
 AH_BOTTOM([
 #if defined(_MSC_VER) && !defined(__clang__)
 # pragma fenv_access(off)
-- 
2.13.3



More information about the vlc-devel mailing list