mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 08:20:28 +01:00
build: add --enable-lto to enable Link Time Optimization (bgo #741140)
Takes about 3x as long to build with gcc 4.8, but gcc 4.9 is supposed to speed that up considerably. Name Before After Saved ------------------------------------- NetworkManager 1734744 1689728 3% libnm 1263536 808816 36% nm-iface-helper 931136 906496 3% libnm-util 441264 437168 1% libnm-glib 297064 292960 2% https://bugzilla.gnome.org/show_bug.cgi?id=741140
This commit is contained in:
parent
53380159dd
commit
67bf5cb1a3
1 changed files with 8 additions and 0 deletions
|
|
@ -821,6 +821,13 @@ AM_CONDITIONAL(BUILD_NMTUI, test "$build_nmtui" = yes)
|
|||
|
||||
NM_COMPILER_WARNINGS
|
||||
|
||||
AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable Link Time Optimization for smaller size (default: no)]),
|
||||
[enable_lto=yes], [enable_lto=no])
|
||||
if (test "${enable_lto}" = "yes"); then
|
||||
CFLAGS="-flto $CFLAGS"
|
||||
fi
|
||||
|
||||
|
||||
dnl -------------------------
|
||||
dnl Vala bindings
|
||||
dnl -------------------------
|
||||
|
|
@ -1070,4 +1077,5 @@ echo " documentation: $enable_gtk_doc"
|
|||
echo " tests: $enable_tests"
|
||||
echo " valgrind: $with_valgrind"
|
||||
echo " code coverage: $enable_code_coverage"
|
||||
echo " LTO: $enable_lto"
|
||||
echo
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue