summaryrefslogtreecommitdiff
path: root/Repository.mk
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2021-04-30 17:26:41 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-20 12:28:54 +0100
commit02140554ee1d70b219a42546191e2219d58be4b0 (patch)
tree3dd419dbdd0c23676c7f749bd8a83d09ad26c8bd /Repository.mk
parent02634fb7c7e8dc613ffc3717bb244f85cf81a7c6 (diff)
WASM --enable-wasm-strip now skips lots of LO code
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'Repository.mk')
-rw-r--r--Repository.mk93
1 files changed, 70 insertions, 23 deletions
diff --git a/Repository.mk b/Repository.mk
index 4cf3aa6d3f48..5c164d73729d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -17,13 +17,18 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_executables,NONE, \
+ canvasdemo \
+))
+endif
+
$(eval $(call gb_Helper_register_executables,NONE, \
$(call gb_Helper_optional,HELPTOOLS, \
HelpIndexer \
HelpLinker \
) \
bestreversemap \
- canvasdemo \
cfgex \
concat-deps \
cpp \
@@ -93,6 +98,12 @@ $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
$(if $(filter ODK,$(BUILD_TYPE)),uno-skeletonmaker) \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
+ $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
+))
+endif
+
$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(if $(ENABLE_ONLINE_UPDATE_MAR),\
mar \
@@ -147,7 +158,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(call gb_Helper_optional,FUZZERS,htmlfuzzer) \
$(call gb_Helper_optional,FUZZERS,sftfuzzer) \
$(call gb_Helper_optional,FUZZERS,dbffuzzer) \
- $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
soffice_bin \
$(call gb_CondExeUnopkg, \
unopkg_bin \
@@ -324,6 +334,37 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
OGLTrans \
))
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ canvastools \
+ $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
+ canvasfactory \
+ cppcanvas \
+ $(if $(filter WNT,$(OS)),directx9canvas) \
+ $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
+ $(if $(filter WNT,$(OS)),gdipluscanvas) \
+ simplecanvas \
+ vclcanvas \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ guesslang \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ hyphen \
+ lnth \
+ spell \
+ $(if $(filter iOS MACOSX,$(OS)), \
+ MacOSXSpell \
+ ) \
+))
+endif
+
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
avmedia \
$(call gb_Helper_optional,AVMEDIA, \
@@ -337,14 +378,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
) \
basegfx \
bib \
- $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
- canvasfactory \
- canvastools \
chartcore \
chartcontroller \
$(call gb_Helper_optional,OPENCL,clew) \
$(if $(filter $(OS),WNT),,cmdmail) \
- cppcanvas \
configmgr \
ctl \
dba \
@@ -356,8 +393,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
deploymentmisc \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(call gb_Helper_optional,SCRIPTING,dlgprov) \
- $(if $(filter WNT,$(OS)),directx9canvas) \
- $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
drawinglayercore \
drawinglayer \
editeng \
@@ -374,19 +409,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
frm \
fsstorage \
fwk \
- $(if $(filter WNT,$(OS)),gdipluscanvas) \
- guesslang \
$(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \
i18npool \
i18nsearch \
- hyphen \
$(if $(ENABLE_JAVA),jdbc) \
$(if $(ENABLE_LDAP),ldapbe2) \
$(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
log \
lng \
- lnth \
$(if $(filter $(OS),MACOSX),macbe1) \
$(if $(MERGELIBS),merged) \
migrationoo2 \
@@ -415,11 +446,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
sdd \
sdfilt \
sfx \
- simplecanvas \
slideshow \
sot \
- spell \
- $(if $(DISABLE_GUI),,spl) \
+ $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \
storagefd \
$(call gb_Helper_optional,SCRIPTING,stringresource) \
svgio \
@@ -449,7 +478,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
vbahelper \
) \
vcl \
- vclcanvas \
writerperfect \
xmlscript \
xmlfa \
@@ -470,9 +498,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
) \
fps_aqua \
) \
- $(if $(filter iOS MACOSX,$(OS)), \
- MacOSXSpell \
- ) \
))
$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
@@ -606,6 +631,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
$(call gb_CondLibSalTextenc,sal_textenc) \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
+ $(if $(filter WNT,$(OS)), \
+ winaccessibility \
+ ) \
+))
+endif
+
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(call gb_Helper_optional,AVMEDIA, \
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
@@ -650,7 +683,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
fps \
inprocserv \
UAccCOM \
- winaccessibility \
) \
))
@@ -884,6 +916,18 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\
) \
))
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+ tipoftheday_images \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+ $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
+))
+endif
+
$(eval $(call gb_Helper_register_packages_for_install,ooo,\
$(if $(SYSTEM_LIBEXTTEXTCAT),,libexttextcat_fingerprint) \
officecfg_misc \
@@ -968,13 +1012,11 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
wizards_basicusr \
wizards_properties \
wizards_wizardshare \
- tipoftheday_images \
toolbarmode_images \
vcl_theme_definitions \
$(if $(filter WNT,$(OS)), \
vcl_opengl_denylist \
) \
- $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
$(if $(filter SKIA,$(BUILD_TYPE)), \
vcl_skia_denylist ) \
$(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \
@@ -1165,9 +1207,14 @@ $(eval $(call gb_Helper_register_mos,\
))
# UI configuration
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
$(eval $(call gb_Helper_register_uiconfigs,\
- cui \
$(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \
+))
+endif
+
+$(eval $(call gb_Helper_register_uiconfigs,\
+ cui \
desktop \
editeng \
filter \