diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-19 07:55:40 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-06 19:38:29 +0100 |
commit | 1c9a40299d328c78c035ca63ccdf22c5c669a03b (patch) | |
tree | ce32754685a0b147ffb701efbbcaa24fa7e36083 /solenv/gbuild | |
parent | ba8b3751fa184c04b9dde4c371b7902e0a9271ff (diff) |
gbuild: create services.rdb from built components
... and introduce the --enable-services-rdb-from-build option.
Currently the build handles global build options redundant
in a few places:
* in Repository*mk + modules - the "real" build dependencies
* the full services.rdb generation
* the static UNO constructor map generation
Also the component files don't reflect the really built components
and so the RDB services generation must handle the whole options
to select the correct components.
So this optionally replaces the latter two by generating the list
of components and it's constructors from the build itself. As a
consequence, component files must now be split, so they reflect
the real components in the libraries, otherwise the static
constructor list will have missing symbols. IMHO this is more
natural, as it happens in the same place already handling these
build options for the sourcecode.
This also adds a convenience helper to add multiple component
files: gb_Library_set_componentfiles
This is WIP and currently just works for the stripped WASM build,
which introduces many more split component files in later patches.
It also explicitly filters the gb_Rdb__URECOMPONENTS and the
CppunitTest related components from the services.rdb. Maybe there
is a good way to do this properly.
Change-Id: I1b38a6f2c1e5221f18d7e5e756c30263b555d962
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126185
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/ComponentTarget.mk | 4 | ||||
-rw-r--r-- | solenv/gbuild/Library.mk | 9 | ||||
-rw-r--r-- | solenv/gbuild/Rdb.mk | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk index 067f24e35ce6..de88ae1f5177 100644 --- a/solenv/gbuild/ComponentTarget.mk +++ b/solenv/gbuild/ComponentTarget.mk @@ -17,6 +17,8 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +gb_ComponentTarget__ALLCOMPONENTS := + gb_ComponentTarget_XSLTCOMMANDFILE := $(SRCDIR)/solenv/bin/createcomponent.xslt gb_ComponentTarget_get_source = $(SRCDIR)/$(1).component @@ -58,6 +60,8 @@ $(call gb_ComponentTarget_get_target,$(1)) : COMPONENTSOURCE := $(call gb_Compon $(call gb_ComponentTarget_get_target,$(1)) : $(call gb_ComponentTarget_get_source,$(patsubst CppunitTest/%,%,$(1))) +$(if $(filter $(1),$(patsubst CppunitTest/%,%,$(1))),$(eval gb_ComponentTarget__ALLCOMPONENTS += $(1))) + endef # vim: set noet sw=4: diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 9894951d3260..36911dee31a0 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -133,6 +133,8 @@ endef # But the component target also must be delivered; use the target # gb_Library_get_exports_target for that purpose, since it is already # the "final" target of the Library... +# +# call gb_Library_set_componentfile,library,componentfile define gb_Library_set_componentfile $(call gb_ComponentTarget_ComponentTarget,$(2),\ $(call gb_Library__get_componentprefix,$(gb_Library__get_name)),\ @@ -143,6 +145,13 @@ $(call gb_ComponentTarget_get_target,$(2)) :| \ $(call gb_Library_get_target,$(gb_Library__get_name)) $(call gb_Library_get_clean_target,$(gb_Library__get_name)) : \ $(call gb_ComponentTarget_get_clean_target,$(2)) + +endef + +# call gb_Library_set_componentfiles,library,componentfiles +define gb_Library_set_componentfiles +$(foreach comp,$(2),$(call gb_Library_set_componentfile,$(1),$(comp))) + endef gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(1)) diff --git a/solenv/gbuild/Rdb.mk b/solenv/gbuild/Rdb.mk index ccbb313d9ce8..d59ab043180a 100644 --- a/solenv/gbuild/Rdb.mk +++ b/solenv/gbuild/Rdb.mk @@ -7,6 +7,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +gb_Rdb__URECOMPONENTS := + gb_Rdb__get_install_target = $(INSTROOT)/$(LIBO_ETC_FOLDER)/services/$(1).rdb define gb_Rdb__command @@ -59,6 +61,7 @@ endef define gb_Rdb_add_component $(call gb_Rdb_get_target,$(1)) : $(call gb_ComponentTarget_get_target,$(2)) $(call gb_Rdb_get_target,$(1)) : COMPONENTS += $(2) +$(if $(filter ure/services,$(1)),$(eval gb_Rdb__URECOMPONENTS += $(2))) endef |