Kaydet (Commit) b00254ab authored tarafından Peter Foley's avatar Peter Foley

make lto work

Change-Id: Iab6892368c6ba6bb5b83132cdcd6aa959c3b0e1f
üst 6cd8e924
...@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\ ...@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\
dbtools \ dbtools \
jvmfwk \ jvmfwk \
sal \ sal \
salhelper \
tl \ tl \
utl \ utl \
i18nisolang1 \ i18nisolang1 \
......
...@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,mysql,\ ...@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,mysql,\
cppu \ cppu \
cppuhelper \ cppuhelper \
sal \ sal \
salhelper \
dbtools \ dbtools \
comphelper \ comphelper \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
......
...@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sdbt,\ ...@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sdbt,\
cppuhelper \ cppuhelper \
dbtools \ dbtools \
sal \ sal \
salhelper \
tl \ tl \
utl \ utl \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
......
...@@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,bib,\ ...@@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,bib,\
cppuhelper \ cppuhelper \
cppu \ cppu \
sal \ sal \
salhelper \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))
......
...@@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,dbp,\ ...@@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,dbp,\
cppuhelper \ cppuhelper \
cppu \ cppu \
sal \ sal \
salhelper \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))
......
...@@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,rpt,\ ...@@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,rpt,\
fwe \ fwe \
i18nisolang1 \ i18nisolang1 \
sal \ sal \
salhelper \
sfx \ sfx \
svl \ svl \
svt \ svt \
......
...@@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,rptui,\ ...@@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,rptui,\
i18nisolang1 \ i18nisolang1 \
rpt \ rpt \
sal \ sal \
salhelper \
sfx \ sfx \
sot \ sot \
svl \ svl \
......
...@@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,rptxml,\ ...@@ -45,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,rptxml,\
editeng \ editeng \
rpt \ rpt \
sal \ sal \
salhelper \
sax \ sax \
sfx \ sfx \
sot \ sot \
......
...@@ -44,6 +44,7 @@ $(call gb_Output_announce,$(2),$(true),ASM,3) ...@@ -44,6 +44,7 @@ $(call gb_Output_announce,$(2),$(true),ASM,3)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \ mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
$(gb_CC) \ $(gb_CC) \
$(gb_LTOFLAGS) \
$(gb_AFLAGS) \ $(gb_AFLAGS) \
-c $(3) \ -c $(3) \
-o $(1)) \ -o $(1)) \
...@@ -61,7 +62,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -61,7 +62,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \ $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \
$(gb_CC) \ $(gb_CC) \
$(DEFS) \ $(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(gb_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
...@@ -101,7 +102,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -101,7 +102,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \ $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \
$(gb_CXX) \ $(gb_CXX) \
$(DEFS) \ $(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(gb_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
......
...@@ -108,7 +108,7 @@ gb_CXXFLAGS_COMMON += -DLIBO_MERGELIBS ...@@ -108,7 +108,7 @@ gb_CXXFLAGS_COMMON += -DLIBO_MERGELIBS
endif endif
ifeq ($(ENABLE_LTO),TRUE) ifeq ($(ENABLE_LTO),TRUE)
gb_Library_LTOFLAGS := -flto -fno-use-linker-plugin gb_LTOFLAGS := -flto
endif endif
gb_LinkTarget_EXCEPTIONFLAGS := \ gb_LinkTarget_EXCEPTIONFLAGS := \
......
...@@ -51,7 +51,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -51,7 +51,7 @@ $(call gb_Helper_abbreviate_dirs,\
unset INCLUDE && \ unset INCLUDE && \
$(if $(filter YES,$(COBJECT_X64)), $(CXX_X64_BINARY), $(gb_CC)) \ $(if $(filter YES,$(COBJECT_X64)), $(CXX_X64_BINARY), $(gb_CC)) \
$(DEFS) \ $(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \ $(gb_LTOFLAGS) \
$(T_CFLAGS) $(T_CFLAGS_APPEND) \ $(T_CFLAGS) $(T_CFLAGS_APPEND) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-Fd$(PDBFILE) \ -Fd$(PDBFILE) \
...@@ -74,7 +74,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -74,7 +74,7 @@ $(call gb_Helper_abbreviate_dirs,\
unset INCLUDE && \ unset INCLUDE && \
$(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), $(gb_CXX)) \ $(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), $(gb_CXX)) \
$(DEFS) \ $(DEFS) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \ $(gb_LTOFLAGS) \
$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \ $(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
-Fd$(PDBFILE) \ -Fd$(PDBFILE) \
......
...@@ -280,7 +280,7 @@ define gb_create_deps ...@@ -280,7 +280,7 @@ define gb_create_deps
endef endef
endif endif
gb_COMPILER_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL) gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
# Helper class # Helper class
......
...@@ -104,12 +104,11 @@ gb_CXXFLAGS += -Wno-deprecated-declarations ...@@ -104,12 +104,11 @@ gb_CXXFLAGS += -Wno-deprecated-declarations
endif endif
endif endif
# Breaks the build, needs more testing ifeq ($(ENABLE_LTO),TRUE)
#ifeq ($(ENABLE_LTO),TRUE) ifneq ($(COM_GCC_IS_CLANG),TRUE)
#ifneq ($(COM_GCC_IS_CLANG),TRUE) gb_LTOFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS)
#gb_LinkTarget_LTOFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS) endif
#endif endif
#endif
ifneq ($(strip $(SYSBASE)),) ifneq ($(strip $(SYSBASE)),)
gb_CXXFLAGS += --sysroot=$(SYSBASE) gb_CXXFLAGS += --sysroot=$(SYSBASE)
...@@ -186,7 +185,7 @@ $(call gb_Helper_abbreviate_dirs,\ ...@@ -186,7 +185,7 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \ mkdir -p $(dir $(1)) && \
$(gb_CXX) \ $(gb_CXX) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
$(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \ $(gb_LTOFLAGS) \
$(if $(SOVERSION),-Wl$(COMMA)--soname=$(notdir $(1)).$(SOVERSION)) \ $(if $(SOVERSION),-Wl$(COMMA)--soname=$(notdir $(1)).$(SOVERSION)) \
$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--version-script=$(SOVERSIONSCRIPT))\ $(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--version-script=$(SOVERSIONSCRIPT))\
$(subst \d,$$,$(RPATH)) \ $(subst \d,$$,$(RPATH)) \
......
...@@ -30,6 +30,7 @@ $(eval $(call gb_Executable_use_external,g2g,boost_headers)) ...@@ -30,6 +30,7 @@ $(eval $(call gb_Executable_use_external,g2g,boost_headers))
$(eval $(call gb_Executable_use_sdk_api,g2g)) $(eval $(call gb_Executable_use_sdk_api,g2g))
$(eval $(call gb_Executable_use_libraries,g2g,\ $(eval $(call gb_Executable_use_libraries,g2g,\
cppuhelper \
jvmfwk \ jvmfwk \
sal \ sal \
svt \ svt \
......
...@@ -38,12 +38,15 @@ $(eval $(call gb_Executable_set_include,$(svx_GENGALBIN),\ ...@@ -38,12 +38,15 @@ $(eval $(call gb_Executable_set_include,$(svx_GENGALBIN),\
$(eval $(call gb_Executable_use_external,$(svx_GENGALBIN),boost_headers)) $(eval $(call gb_Executable_use_external,$(svx_GENGALBIN),boost_headers))
$(eval $(call gb_Executable_use_libraries,$(svx_GENGALBIN),\ $(eval $(call gb_Executable_use_libraries,$(svx_GENGALBIN),\
basegfx \
sal \ sal \
tl \ tl \
svl \ svl \
svt \
comphelper \ comphelper \
cppu \ cppu \
cppuhelper \ cppuhelper \
utl \
vcl \ vcl \
svxcore \ svxcore \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment