[Spice-devel] [vdagent-win PATCH] Avoid using LTO by default during compilation

Frediano Ziglio fziglio at redhat.com
Wed Jul 26 10:38:08 UTC 2017


LTO option allows to have smaller executable stripping
unneeded part of code.
These options were added by a095f4806e ("build-sys: statically
build agent").
The gain of using these options currently are quite small,
from a small test:

$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 506880 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 198656 Jul 26 11:26 vdservice.exe

$ ll *.exe
-rwxrwxr-x. 1 freddy freddy 509952 Jul 26 11:26 vdagent.exe
-rwxrwxr-x. 1 freddy freddy 200192 Jul 26 11:26 vdservice.exe

Considering that there are some bug in some recent MinGW distributions
like https://bugzilla.redhat.com/show_bug.cgi?id=1475237 and
the small gain I would disable these options.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 Makefile.am | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 40db903..7fafb8b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,6 @@ MAINTAINERCLEANFILES = mingw-spice-vdagent.spec
 
 DIST_SUBDIRS = spice-protocol
 
-AM_CXXFLAGS = -flto -fwhole-program
 AM_CPPFLAGS = 				\
 	-DUNICODE 			\
 	-D_UNICODE			\
-- 
2.13.3



More information about the Spice-devel mailing list