Having them in StdGNU.mk would affect both hypervisor and tools build.
However judging from the commit message of e4cdd74f LTO was only meant
to affect hypvervisor build.

Move the relevant bits to xen/Rules.mk.

Signed-off-by: Wei Liu <wei.l...@citrix.com>
---
Cc: Andrew Cooper <andrew.coop...@citrix.com>
Cc: George Dunlap <george.dun...@eu.citrix.com>
Cc: Ian Jackson <ian.jack...@eu.citrix.com>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Stefano Stabellini <sstabell...@kernel.org>
Cc: Tim Deegan <t...@xen.org>
Cc: Wei Liu <wei.l...@citrix.com>
---
 config/StdGNU.mk | 4 ----
 xen/Rules.mk     | 2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 6be8233..039274e 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -35,7 +35,3 @@ UTIL_LIBS = -lutil
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
-ifeq ($(lto),y)
-CFLAGS += -flto
-LDFLAGS-$(clang) += -plugin LLVMgold.so
-endif
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 24d13dc..77bcd44 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -120,6 +120,8 @@ $(filter-out %.init.o $(nogcov-y),$(obj-y) $(obj-bin-y) 
$(extra-y)): CFLAGS += -
 endif
 
 ifeq ($(CONFIG_LTO),y)
+CFLAGS += -flto
+LDFLAGS-$(clang) += -plugin LLVMgold.so
 # Would like to handle all object files as bitcode, but objects made from
 # pure asm are in a different format and have to be collected separately.
 # Mirror the directory tree, collecting them as built_in_bin.o.
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to