From: Konstantin Demin rockdrilla@gmail.com
Signed-off-by: Konstantin Demin rockdrilla@gmail.com --- configure | 19 +++++++++++++++++++ configure.ac | 12 ++++++++++++ 2 files changed, 31 insertions(+)
diff --git a/configure b/configure index 532b8d8a30e..83ed054686d 100755 --- a/configure +++ b/configure @@ -922,6 +922,7 @@ enable_maintainer_mode enable_sast enable_silent_rules enable_werror +enable_lto with_alsa with_capi with_coreaudio @@ -2521,6 +2522,7 @@ Optional Features: Clang --enable-silent-rules use silent build rules (override: "make V=1") --enable-werror treat compilation warnings as errors + --enable-lto build with LTO (EXPERIMENTAL) --disable-largefile omit support for large files --disable-year2038 don't support timestamps after 2038
@@ -4339,6 +4341,12 @@ then : enableval=$enable_werror; fi
+# Check whether --enable-lto was given. +if test ${enable_lto+y} +then : + enableval=$enable_lto; +fi +
# Check whether --with-alsa was given. @@ -10110,6 +10118,11 @@ do esac done
+if test "x$enable_lto" = xyes +then + as_fn_append EXTRACFLAGS " -D__WINE_LTO_BUILD" +fi + for wine_arch in $cross_archs $extra_arch do case "x$with_mingw" in @@ -10398,6 +10411,11 @@ fi eval LDFLAGS=$${wine_arch}_LDFLAGS eval "${wine_arch}_EXTRACFLAGS="-D__WINE_PE_BUILD -Wall""
+ if test "x$enable_lto" = xyes + then + as_fn_append ${wine_arch}_EXTRACFLAGS " -D__WINE_LTO_BUILD" + fi + target="" set x $CC shift @@ -22092,6 +22110,7 @@ printf %s "creating Makefile rules..." >&6
makedep_flags=" -C" test "x$enable_silent_rules" = xyes && makedep_flags="$makedep_flags -S" +test "x$enable_lto" = xyes && makedep_flags="$makedep_flags -L"
wine_srcdir= test "$srcdir" = . || wine_srcdir="$srcdir/" diff --git a/configure.ac b/configure.ac index cf698988a7b..4a03a47c010 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,7 @@ AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable AC_ARG_ENABLE(sast, AS_HELP_STRING([--enable-sast],[enable static application security testing using Clang])) AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[use silent build rules (override: "make V=1")])) AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[treat compilation warnings as errors])) +AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto],[build with LTO (EXPERIMENTAL)]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support])) AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)])) @@ -810,6 +811,11 @@ do esac done
+if test "x$enable_lto" = xyes +then + AS_VAR_APPEND([EXTRACFLAGS],[" -D__WINE_LTO_BUILD"]) +fi + for wine_arch in $cross_archs $extra_arch do case "x$with_mingw" in @@ -844,6 +850,11 @@ do AS_VAR_COPY([LDFLAGS],[${wine_arch}_LDFLAGS]) AS_VAR_SET([${wine_arch}_EXTRACFLAGS],["-D__WINE_PE_BUILD -Wall"])
+ if test "x$enable_lto" = xyes + then + AS_VAR_APPEND([${wine_arch}_EXTRACFLAGS],[" -D__WINE_LTO_BUILD"]) + fi + target="" set x $CC shift @@ -2386,6 +2397,7 @@ AS_ECHO_N("creating Makefile rules...") >&AS_MESSAGE_FD
makedep_flags=" -C" test "x$enable_silent_rules" = xyes && makedep_flags="$makedep_flags -S" +test "x$enable_lto" = xyes && makedep_flags="$makedep_flags -L"
wine_srcdir= test "$srcdir" = . || wine_srcdir="$srcdir/"