]> xenbits.xensource.com Git - xen.git/commitdiff
build: move setting LTO options to xen/Rules.mk
authorWei Liu <wei.liu2@citrix.com>
Fri, 23 Dec 2016 12:12:36 +0000 (12:12 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 5 Jan 2017 16:33:15 +0000 (16:33 +0000)
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@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
config/StdGNU.mk
xen/Rules.mk

index 6be823320507e7f43c76092fc9ba643093145286..039274ea61c706dc5a102af633e657385aff0983 100644 (file)
@@ -35,7 +35,3 @@ UTIL_LIBS = -lutil
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
-ifeq ($(lto),y)
-CFLAGS += -flto
-LDFLAGS-$(clang) += -plugin LLVMgold.so
-endif
index 24d13dcad1256afdf024f8dfa4cad623bb86b4e5..77bcd449224d27736e40129fc637906762253c91 100644 (file)
@@ -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.