From d6924bd032afc285a69b727715d6010eac1fc6c1 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Fri, 23 Dec 2016 12:12:36 +0000 Subject: [PATCH] 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 --- 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 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. -- 2.30.2