[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] build: move setting LTO options to xen/Rules.mk



commit d6924bd032afc285a69b727715d6010eac1fc6c1
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Dec 23 12:12:36 2016 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Thu Jan 5 16:33:15 2017 +0000

    build: move setting LTO options to xen/Rules.mk
    
    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.liu2@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 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.
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.