diff options
author | Peter Foley <pefoley2@verizon.net> | 2013-04-14 16:59:08 -0400 |
---|---|---|
committer | Peter Foley <pefoley2@verizon.net> | 2013-04-14 18:50:22 -0400 |
commit | 4960f665194760fc913cbfb97d35c1c182bbdd0d (patch) | |
tree | 5355a9e58730f9637f69ff387d49b9a3c42c4ac2 | |
parent | Small format fixes in IDL files (diff) | |
download | core-4960f665194760fc913cbfb97d35c1c182bbdd0d.tar.gz core-4960f665194760fc913cbfb97d35c1c182bbdd0d.zip |
Don't build unneccesary libraries twice
Only the libs that are deps of build-time
tools need to be built twice to avoid circular deps.
all other merged libraries are never linked to.
Change-Id: I75b85ed3056413adae12f1d55764fa7c117b3f45
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 98964d764ff5..0d5f24b0437e 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -443,7 +443,9 @@ mv $${TEMPFILE} $(call gb_LinkTarget_get_objects_list,$(2)) endef $(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%) $(gb_Helper_MISCDUMMY) - $(call gb_LinkTarget__command,$@,$*) + $(if $(filter $*,$(foreach lib,$(gb_MERGEDLIBS) $(gb_URELIBS),$(call gb_Library_get_linktargetname,$(lib)))),\ + $(if $(filter $(true),$(call gb_LinkTarget__is_build_lib,$*)),\ + $(call gb_LinkTarget__command,$@,$*),mkdir -p $(dir $@) && echo invalid > $@),$(call gb_LinkTarget__command,$@,$*)) $(call gb_LinkTarget__command_objectlist,$@,$*) ifeq ($(gb_FULLDEPS),$(true)) @@ -836,8 +838,26 @@ $(call gb_LinkTarget_get_external_headers_target,$(1)) : \ endef -define gb_Linktarget__is_build_tool -$(if $(filter $(1),$(addprefix Executable/,cppumaker idlc regcompare regmerge rsc svidl)),$(true),$(false)) +gb_BUILD_LIBS := basegfx \ + reg \ + sal \ + salhelper \ + store \ + tl \ + unoidl + +gb_BUILD_TOOLS := cppumaker \ + idlc \ + regmerge \ + rsc \ + svidl + +define gb_LinkTarget__is_build_lib +$(if $(filter $(1),$(foreach lib,$(gb_BUILD_LIBS),$(call gb_Library_get_linktargetname,$(lib)))),$(true),$(false)) +endef + +define gb_LinkTarget__is_build_tool +$(if $(filter $(1),$(addprefix Executable/,$(gb_BUILD_TOOLS))),$(true),$(false)) endef define gb_LinkTarget_use_libraries @@ -846,7 +866,7 @@ $$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Librar $$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter-out $(gb_Library_KNOWNLIBS),$(2)). Libraries must be registered in Repository.mk)) endif -ifeq ($(call gb_Linktarget__is_build_tool,$(1)),$(true)) +ifeq ($(call gb_LinkTarget__is_build_tool,$(1)),$(true)) $(call gb_LinkTarget__use_libraries,$(1),$(2),$(2),$(4)) else |