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.
This commit is contained in:
gambas 2018-05-10 09:13:15 +02:00
parent 1701be8a34
commit d552008415

View file

@ -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