From 02140554ee1d70b219a42546191e2219d58be4b0 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (Allotropia)" Date: Fri, 30 Apr 2021 17:26:41 +0200 Subject: 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 --- sfx2/Library_sfx.mk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'sfx2/Library_sfx.mk') diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 51a34d510771..d790d9fef901 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -23,6 +23,10 @@ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx,services)) +$(eval $(call gb_Library_add_componentimpls,sfx, \ + $(if $(ENABLE_WASM_STRIP_RECENT),,extended) \ +)) + $(eval $(call gb_Library_set_precompiled_header,sfx,sfx2/inc/pch/precompiled_sfx)) $(eval $(call gb_Library_use_custom_headers,sfx,\ @@ -81,6 +85,15 @@ $(eval $(call gb_Library_use_externals,sfx,\ orcus-parser\ )) +ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/dialog/backingcomp \ + sfx2/source/dialog/backingwindow \ + sfx2/source/control/recentdocsview \ + sfx2/source/control/recentdocsviewitem \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/accessibility/AccessibilityCheck \ sfx2/source/accessibility/AccessibilityIssue \ @@ -142,8 +155,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/control/msg \ sfx2/source/control/msgpool \ sfx2/source/control/objface \ - sfx2/source/control/recentdocsview \ - sfx2/source/control/recentdocsviewitem \ sfx2/source/control/request \ sfx2/source/control/sfxstatuslistener \ sfx2/source/control/shell \ @@ -170,8 +181,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/devtools/DocumentModelTreeHandler \ sfx2/source/devtools/ObjectInspectorTreeHandler \ sfx2/source/dialog/alienwarn \ - sfx2/source/dialog/backingcomp \ - sfx2/source/dialog/backingwindow \ sfx2/source/dialog/basedlgs \ sfx2/source/dialog/checkin \ sfx2/source/dialog/dialoghelper \ -- cgit