From d55200841514da279d771cfe865b3cf4e281ba21 Mon Sep 17 00:00:00 2001 From: gambas Date: Thu, 10 May 2018 09:13:15 +0200 Subject: [PATCH] Add a flag for enabling link time optimization, and disable it by default. [CONFIGURATION] * NEW: Add a flag for enabling link time optimization, and disable it by default. --- acinclude.m4 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index ee2b32bb0..f654e0f26 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -330,10 +330,23 @@ AC_DEFUN([GB_INIT], have_gcc_lto=yes ]) + AC_ARG_ENABLE( + lto, + [ --enable-lto enable link time optimization (default: no)], + gambas_lto=$enableval, + gambas_lto=no + ) + + if test "$gambas_lto" = "no"; then + have_gcc_lto=no; + GB_CFLAGS_LTO=""; + fi + if test "$have_gcc_lto" = "yes"; then AC_DEFINE(HAVE_GCC_LTO, 1, [Whether gcc supports -flto]) fi + dnl ---- Debug flags if test "$gambas_debug" = "yes"; then