From: Wei Liu Date: Fri, 23 Dec 2016 12:12:36 +0000 (+0000) Subject: build: move setting LTO options to xen/Rules.mk X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3051 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d6924bd032afc285a69b727715d6010eac1fc6c1;p=xen.git 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 Reviewed-by: Andrew Cooper Acked-by: Ian Jackson --- diff --git a/config/StdGNU.mk b/config/StdGNU.mk index 6be8233205..039274ea61 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 24d13dcad1..77bcd44922 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.