diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-12-29 11:42:30 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-01 18:37:23 +0100 |
commit | ed583bf8d553b145f83b66118253aaf7ac94fa1a (patch) | |
tree | e63a852a9f57505ad564e07ec4baf46d3d1307b0 /Repository.mk | |
parent | b9c106d491d2c13d74760a47e424192a3291860a (diff) |
gbuild: introduce plugin + loader concepts
This introduces two concepts: a plugin and its loader (library)
LO currrently has dependency cycles for some libraries. There is
scui, which depends on sc, while sc dlopen's scui. There are the
various vclplug_*, i18npool plugins, filters/gie, acc, etc.
Usually these plugins link to their loader library, because they
use its symbols. But as a result there is no sensible way to
express the runtime dependency of loaders on the plugins.
In GNU libtool plugins are called modules and they are implemented
in an IMHO more sensible way by allowing missing symbols at link
time. This way you can have a dependency from the loader library
to its plugins, as the plugins don't depend on the loader, but you
lose the link time detection of missing symbols.
While this is in theory possible in LO too, LO currently has
plugins, like acc (accessibility), loaded by tk (toolkit), which
depends on svt (svtools), which itself depends on tk, so dropping
the tk dependency for acc on its own doesn't help :-(
And while the dependency of the plugins on their loader is fine
for the shared / DYNLOADING build, for the "static" builds you
must (somehow) link the plugins into the executables.
I also codeified a few rules into the build system along with it:
* just plugins are allowed to depend / link other plugins
* plugins aren't allowed to be linked into the merge lib
* plugin loaders are "limited" to libraries
At the high level, this is implemented via new gbuild calls:
* gb_Library_set_plugin_for,lib,loader: declare a library to be a
plugin of a loader library and add a dependeny from the plugin
library to the loader library
* gb_Library_set_plugin_for_nodep,lib,loader: ^^^^ without adding
the library dependeny
* gb_Helper_register_plugins_for_install: "plugin" replacement for
gb_Helper_register_libraries_for_install to implement some
additional checks in the build system
In the end this patch just adds a bit syntactic sugar and nothing
changes for any build.
Change-Id: I7b01d9c384cbc5838bd2cc93aff18e4868939d6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126163
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'Repository.mk')
-rw-r--r-- | Repository.mk | 85 |
1 files changed, 55 insertions, 30 deletions
diff --git a/Repository.mk b/Repository.mk index ec763106f30e..5b867ca478bc 100644 --- a/Repository.mk +++ b/Repository.mk @@ -256,12 +256,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \ sc \ scd \ scfilt \ - scui \ wpftcalc \ solver \ $(call gb_Helper_optional,SCRIPTING,vbaobj) \ )) +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,calc, \ + scui \ +)) + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,graphicfilter, \ svgfilter \ wpftdraw \ @@ -284,21 +287,28 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,onlineupdate, \ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,gnome, \ $(if $(ENABLE_EVOAB2),evoab) \ - $(if $(ENABLE_GTK3),vclplug_gtk3) \ - $(if $(ENABLE_GTK4),vclplug_gtk4) \ $(if $(ENABLE_GIO),losessioninstall) \ $(if $(ENABLE_GIO),ucpgio1) \ )) +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,gnome, \ + $(if $(ENABLE_GTK3),vclplug_gtk3) \ + $(if $(ENABLE_GTK4),vclplug_gtk4) \ +)) + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,kde, \ $(if $(ENABLE_KF5),kf5be1) \ - $(if $(USING_X11), \ - $(if $(ENABLE_KF5),vclplug_kf5) \ - $(if $(ENABLE_QT5),vclplug_qt5) \ - $(if $(ENABLE_QT6),vclplug_qt6) \ - $(if $(ENABLE_GTK3_KDE5),vclplug_gtk3_kde5) \ - ) \ )) + +ifneq (,$(USING_X11)) +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,kde, \ + $(if $(ENABLE_KF5),vclplug_kf5) \ + $(if $(ENABLE_QT5),vclplug_qt5) \ + $(if $(ENABLE_QT6),vclplug_qt6) \ + $(if $(ENABLE_GTK3_KDE5),vclplug_gtk3_kde5) \ +)) +endif + ifneq ($(ENABLE_GTK3_KDE5),) $(eval $(call gb_Helper_register_executables_for_install,OOO,kde, \ lo_kde5filepicker \ @@ -306,7 +316,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,kde, \ endif ifeq ($(OS),HAIKU) -$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,haiku, \ +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,haiku, \ $(if $(ENABLE_QT5),vclplug_qt5) \ $(if $(ENABLE_QT6),vclplug_qt6) \ $(if $(ENABLE_KF5),vclplug_kf5) \ @@ -323,7 +333,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \ )) $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ - acc \ avmedia \ $(call gb_Helper_optional,AVMEDIA, \ $(if $(filter MACOSX,$(OS)),\ @@ -346,7 +355,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ cppcanvas \ configmgr \ ctl \ - cui \ dba \ dbahsql \ $(call gb_Helper_optional,DBCONNECTIVITY, \ @@ -380,7 +388,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ i18npool \ i18nsearch \ hyphen \ - icg \ $(if $(ENABLE_JAVA),jdbc) \ $(if $(ENABLE_LDAP),ldapbe2) \ $(if $(filter WNT,$(OS)),WinUserInfoBe) \ @@ -415,7 +422,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ sd \ sdd \ sdfilt \ - sdui \ sfx \ simplecanvas \ slideshow \ @@ -460,14 +466,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ xof \ xsltdlg \ xsltfilter \ - $(if $(USING_X11), \ - vclplug_gen \ - ) \ $(if $(filter $(OS),WNT), \ ado \ oleautobridge \ smplmail \ - vclplug_win \ wininetbe1 \ ) \ $(if $(filter $(OS),MACOSX), \ @@ -475,13 +477,24 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ AppleRemote \ ) \ fps_aqua \ - vclplug_osx \ ) \ $(if $(filter iOS MACOSX,$(OS)), \ MacOSXSpell \ ) \ )) +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \ + acc \ + cui \ + gie \ + icg \ + sdui \ + $(if $(USING_X11),vclplug_gen) \ + $(if $(filter $(OS),WNT),vclplug_win) \ + $(if $(filter $(OS),MACOSX),vclplug_osx) \ + $(if $(USING_X11),,$(if $(ENABLE_QT5),vclplug_qt5)) \ +)) + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,postgresqlsdbc, \ $(if $(BUILD_POSTGRESQL_SDBC), \ postgresql-sdbc \ @@ -518,7 +531,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,writer, \ $(if $(ENABLE_LWP),lwpft) \ msword \ swd \ - swui \ t602filter \ $(call gb_Helper_optional,SCRIPTING,vbaswobj) \ wpftwriter \ @@ -526,6 +538,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,writer, \ $(call gb_Helper_optional,DBCONNECTIVITY,writer) \ )) +$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,writer, \ + swui \ +)) + # cli_cppuhelper is NONE even though it is actually in URE because it is CliNativeLibrary $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ smoketest \ @@ -562,6 +578,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_URE,ure, \ ) \ log_uno_uno \ unsafe_uno_uno \ +)) + +$(eval $(call gb_Helper_register_plugins_for_install,PLAINLIBS_URE,ure, \ $(if $(filter EMSCRIPTEN,$(OS)),, \ $(if $(filter MSC,$(COM)), \ $(if $(filter INTEL,$(CPUNAME)),msci_uno) \ @@ -586,7 +605,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \ proxyfac \ reflection \ reg \ - sal_textenc \ stocservices \ store \ unoidl \ @@ -594,29 +612,25 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \ xmlreader \ )) +$(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \ + sal_textenc \ +)) + $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ $(call gb_Helper_optional,AVMEDIA, \ $(if $(ENABLE_GSTREAMER_1_0),avmediagst) \ $(if $(filter WNT,$(OS)),avmediawin) \ ) \ cached1 \ - collator_data \ comphelper \ $(call gb_Helper_optional,DBCONNECTIVITY,dbpool2) \ $(call gb_Helper_optional,BREAKPAD,crashreport) \ deployment \ deploymentgui \ - dict_ja \ - dict_zh \ embobj \ $(if $(ENABLE_JAVA),hsqldb) \ i18nutil \ - index_data \ $(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), libreofficekitgtk) \ - localedata_en \ - localedata_es \ - localedata_euro \ - localedata_others \ $(if $(ENABLE_JAVA), \ $(if $(filter $(OS),MACOSX),,officebean) \ ) \ @@ -626,7 +640,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ sdbc2 \ sofficeapp \ srtrs1 \ - textconv_dict \ ucb1 \ ucbhelper \ $(if $(WITH_WEBDAV),ucpdav1) \ @@ -651,6 +664,18 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ ) \ )) +$(eval $(call gb_Helper_register_plugins_for_install,PLAINLIBS_OOO,ooo, \ + collator_data \ + dict_ja \ + dict_zh \ + index_data \ + localedata_en \ + localedata_es \ + localedata_euro \ + localedata_others \ + textconv_dict \ +)) + ifeq ($(OS),WNT) $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexbinarytable, \ regactivex \ |