[Libreoffice-commits] core.git: Branch 'feature/wasm' - 383 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source android/source avmedia/Library_avmedia.mk avmedia/Module_avmedia.mk avmedia/source basctl/inc basctl/Library_basctl.mk basctl/source basegfx/CppunitTest_basegfx.mk basegfx/source basegfx/test basic/inc basic/Library_sb.mk basic/source bin/run bin/symbolstore.py bin/ui-rules-enforcer.py bridges/Library_cpp_uno.mk canvas/Module_canvas.mk canvas/source chart2/CppunitTest_chart2_import2.mk chart2/CppunitTest_chart2_import.mk chart2/import_setup.mk chart2/inc chart2/Library_chartcontroller.mk chart2/Module_chart2.mk chart2/qa chart2/source chart2/uiconfig comphelper/source compilerplugins/clang config_host/config_features.h.in config_host/config_wasm_strip.h.in config_host.mk.in configure.ac connectivity/Library_postgresql-sdbc-impl.mk connectivity/source cppuhelper/source cppu/source cpputools/Module_cpputools.mk cui/inc cui/Library_cui.mk cui/source cui/uiconfig c ui/UIConfig_cui.mk dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/source dbaccess/uiconfig desktop/CustomTarget_soffice.mk desktop/Executable_soffice_bin.mk desktop/inc desktop/Library_deployment.mk desktop/Module_desktop.mk desktop/Package_scripts.mk desktop/Pagein_common.mk desktop/scripts desktop/source dictionaries distro-configs/LibreOfficeWASM32.conf drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/source editeng/Library_editeng.mk editeng/source emfio/inc emfio/source extensions/Module_extensions.mk extensions/source extensions/uiconfig external/clucene external/hunspell external/hyphen external/libnumbertext external/libxml2 external/Module_external.mk external/mythes external/redland extras/Module_extras.mk filter/Library_icg.mk filter/source filter/uiconfig forms/source formula/inc formula/source fpicker/inc fpicker/source framework/inc framework/Library_fwk.mk framework/source framework/util .gitignore helpcompiler/Module_helpcompiler.mk helpcontent2 i18npool/CustomTarget_breakiterator.mk i18npool/Library_collator_data.mk i18npool/Library_dict_ja.mk i18npool/Library_dict_zh.mk i18npool/Library_i18npool.mk i18npool/Library_index_data.mk i18npool/Library_localedata_en.mk i18npool/Library_localedata_es.mk i18npool/Library_localedata_euro.mk i18npool/Library_localedata_others.mk i18npool/Library_textconv_dict.mk i18npool/qa i18npool/source i18npool/util i18nutil/source include/avmedia include/basegfx include/basic include/comphelper include/connectivity include/desktop include/drawinglayer include/editeng include/filter include/o3tl include/oox include/registry include/sfx2 include/sot include/svl include/svtools include/svx include/toolkit include/tools include/unotools include/vbahelper include/vcl include/xmloff l10ntools/source lingucomponent/Library_guesslang.mk lingucomponent/Module_lingucomponent.mk m4/libo_externals.m4 Makefile.gbuild Makefile.in nlpsolver/src nlpsolver/ThirdParty officecfg/registry oox/CppunitTest_oox_token map.mk oox/inc oox/Library_oox.mk oox/qa oox/source package/source postprocess/CustomTarget_components.mk postprocess/Module_postprocess.mk postprocess/Rdb_services.mk README.help.md README.wasm registry/Module_registry.mk reportdesign/inc reportdesign/source reportdesign/uiconfig RepositoryExternal.mk Repository.mk RepositoryModule_build.mk RepositoryModule_host.mk sal/Library_cppunitmain.mk sal/Library_sal.mk sal/Library_sal_textenc.mk sal/Module_sal.mk sal/osl sal/rtl scaddins/source sccomp/Module_sccomp.mk sccomp/source sc/inc sc/Library_sc.mk sc/Library_scui.mk sc/Module_sc.mk scp2/source sc/qa scripting/Module_scripting.mk sc/sdi sc/source sc/uiconfig sdext/source sd/inc sd/Library_sd.mk sd/Library_sdui.mk sd/qa sd/sdi sd/source sd/uiconfig sfx2/classification sfx2/inc sfx2/Library_sfx.mk sfx2/Package_classification.mk sfx2/source sfx2/uiconfig sfx2/util shell/Module_shell.mk slideshow/inc slideshow/source solenv/bin solenv/clang-format solenv/Executable_lockfile.mk solenv/fla tpak-manifest.in solenv/gbuild solenv/lockfile solenv/Module_solenv.mk solenv/sanitizers sot/source starmath/inc starmath/source static/CustomTarget_components.mk static/Library_components.mk static/Makefile static/Module_static.mk static/README svl/source svtools/source svx/CppunitTest_svx_removewhichrange.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util sw/CppunitTest_sw_apitests.mk sw/CppunitTest_sw_indexingexport.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_uwriter.mk sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk sw/util toolkit/source tools/CppunitTest_tools_test.mk tools/qa tools/source translations uitest/uitest unotest/source unotools/Library_utl.mk unotools/qa unotools/source ure/Package_install.mk vbahelper/inc vcl/backendtest vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3_kde5 .mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_gtk4.mk vcl/Library_vclplug_kf5.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_qt5.mk vcl/Library_vclplug_win.mk vcl/Module_vcl.mk vcl/qa vcl/source vcl/unx vcl/win wasm-qt/Module_wasm-qt.mk wizards/source writerfilter/source writerperfect/inc writerperfect/Library_wpftwriter.mk writerperfect/Module_writerperfect.mk writerperfect/qa writerperfect/source xmlhelp/README.md xmlhelp/source xmloff/Library_xof.mk xmloff/Library_xo.mk xmloff/source xmloff/util xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/source xmlsecurity/util

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 22 12:21:30 UTC 2021


Rebased ref, commits from common ancestor:
commit 9d9b649673bfe9383645c4f052d127b219b86d0d
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 22 14:19:48 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 14:19:48 2021 +0200

    wasm: test for Qt5 and non-system Freetype
    
    Change-Id: I91a99f5bb58ae6caad020f8159313413dfa0ab6a

diff --git a/configure.ac b/configure.ac
index 1b82560feca1..199e2318e304 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1105,6 +1105,8 @@ emscripten)
     using_freetype_fontconfig=yes
     using_x11=no
     test_openldap=no
+    test_qt5=yes
+    test_system_freetype=no
     enable_compiler_plugins=no
     enable_wasm_strip=yes
     with_system_zlib=no
commit b6c574a5b810e50013c593ec3c4e6d2b421685b0
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jun 11 11:57:40 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 12:12:05 2021 +0200

    configure: make OpenLDAP test independent from X11
    
    I missed that PostgreSQL can be build on MacOSX with OpenLDAP
    support. Stephan had an incremental build failure because of it.
    
    But instead of opting-in using test_openldap=yes on MacOSX, like
    on Haiku, this drops the using_x11 dependency and defaults to
    "yes", like it was before. This was more of a convenience then
    reality anyway, and it makes really not much sense to disable
    OpenLDAP in case of --without-x.
    
    Change-Id: I959a3b30f1c369264174302f18267a4eb40a3a52

diff --git a/configure.ac b/configure.ac
index 92d260dd8c21..1b82560feca1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -821,6 +821,7 @@ build_crypto=yes
 test_cmis=yes
 test_curl=yes
 test_gdb_index=no
+test_openldap=yes
 test_split_debug=no
 test_webdav=yes
 
@@ -910,6 +911,7 @@ cygwin*|wsl*)
 
     using_freetype_fontconfig=no
     using_x11=no
+    test_openldap=no
     build_skia=yes
     _os=WINNT
 
@@ -965,6 +967,7 @@ ios*) # iOS
     using_x11=no
     build_crypto=no
     test_cmis=no
+    test_openldap=no
     test_webdav=no
     if test -n "$LODE_HOME" ; then
         mac_sanitize_path
@@ -1067,6 +1070,7 @@ linux-android*)
     using_headless_plugin=no
     using_x11=no
     build_crypto=no
+    test_openldap=no
     test_system_freetype=no
     test_webdav=no
     disable_database_connectivity_dependencies
@@ -1088,7 +1092,6 @@ haiku*)
     using_x11=no
     test_gtk3_kde5=no
     test_kf5=yes
-    test_openldap=yes
     enable_odk=no
     enable_coinmp=no
     enable_pdfium=no
@@ -1101,6 +1104,7 @@ haiku*)
 emscripten)
     using_freetype_fontconfig=yes
     using_x11=no
+    test_openldap=no
     enable_compiler_plugins=no
     enable_wasm_strip=yes
     with_system_zlib=no
@@ -1126,7 +1130,6 @@ test "${test_gstreamer_1_0+set}" = set || test_gstreamer_1_0="$using_x11"
 test "${test_gtk3+set}" = set || test_gtk3="$using_x11"
 test "${test_gtk4+set}" = set || test_gtk4="$using_x11"
 test "${test_kf5+set}" = set || test_kf5="$using_x11"
-test "${test_openldap+set}" = set || test_openldap="$using_x11"
 # don't handle test_qt5, so it can disable test_kf5 later
 test "${test_randr+set}" = set || test_randr="$using_x11"
 test "${test_xrender+set}" = set || test_xrender="$using_x11"
@@ -1154,7 +1157,6 @@ disable_x11_tests()
     test_gtk3=no
     test_gtk4=no
     test_kf5=no
-    test_openldap=no
     test_qt5=no
     test_randr=no
     test_xrender=no
commit 0764eb07cf1fa275a44ea8703244f67ab71379db
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun May 30 13:23:16 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 12:12:05 2021 +0200

    libxml2: Use xml2-config dummy for internal
    
    When building a static LO with --disable-dynloading on Linux,
    --without-system-libs failed for me. And it left me really puzzled:
    raptor configure failed and claimed it couldn't link libxml2.
    config.log showed missing math functions. xml2-config of LO's
    build is patched and it includes a -lm. The xml2-config in my
    chroot doesn't. But we explicitly pass the xml2-config for
    non-system-libxml2 build. Reading the configure from raptor didn't
    reveal a way, that it could somehow pick up the xml2-config from
    the chroot, but that code is autoconf-complex...
    
    When running "sh -x configure", it turned out the configure script
    actually picks up the LIBXML_* flags from the environment, which
    are set by LO's config_host.mk. These just add -lm for Android.
    
    So this adds a xml2-config.in "dummy", which overwrites the one
    from the libxml2 source and just echos LO's LIBXML_* values.
    And it adds -lm for all DISABLE_DYNLOADING targets. And drops the
    atexit xmlCleanupParser test, which fails with duplicate symbols
    for a static build.
    
    Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87

diff --git a/configure.ac b/configure.ac
index d88d83040895..92d260dd8c21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9611,7 +9611,7 @@ else
         LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
     else
         LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
-        if test "$_os" = Android; then
+        if test "$DISABLE_DYNLOADING" = TRUE; then
             LIBXML_LIBS="$LIBXML_LIBS -lm"
         fi
     fi
diff --git a/desktop/Executable_soffice_bin.mk b/desktop/Executable_soffice_bin.mk
index 9c08a28361df..14a72ab6c055 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_Executable_set_include,soffice_bin,\
     -I$(SRCDIR)/desktop/source/inc \
 ))
 
+$(eval $(call gb_Executable_add_defs,soffice_bin,\
+    $(if $(DISABLE_DYNLOADING),$(if $(SYSTEM_LIBXML),,-DNOTEST_xmlCleanupParser)) \
+))
+
 $(eval $(call gb_Executable_use_libraries,soffice_bin,\
     sal \
     sofficeapp \
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
index 6631c3ceb337..fdd2eb3505dc 100644
--- a/desktop/source/app/main.c
+++ b/desktop/source/app/main.c
@@ -21,6 +21,7 @@
 
 #include "sofficemain.h"
 
+#ifndef NOTEST_xmlCleanupParser
 #ifdef DBG_UTIL
 #ifdef __gnu_linux__
 #include <stdio.h>
@@ -43,14 +44,17 @@ __attribute__((visibility("default"))) void xmlCleanupParser(void)
 }
 #endif
 #endif
+#endif // NOTEST_xmlCleanupParser
 
 SAL_IMPLEMENT_MAIN()
 {
     int ret = soffice_main();
+#ifndef NOTEST_xmlCleanupParser
 #ifdef DBG_UTIL
 #ifdef __gnu_linux__
     g_Exiting = 1;
 #endif
+#endif
 #endif
     return ret;
 }
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 83df02849cb3..8c81c3d26e4c 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
-	external/libxml2/libxml2-config.patch.1 \
 	external/libxml2/libxml2-global-symbols.patch \
 	external/libxml2/libxml2-vc10.patch \
 	$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
@@ -23,4 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
 		external/libxml2/libxml2-icu.patch.0) \
 ))
 
+$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
deleted file mode 100644
index 5a2ef1485e92..000000000000
--- a/external/libxml2/libxml2-config.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-Hack the xml2-config to return paths into WORKDIR.
-
---- a/xml2-config.in	2009-12-17 11:45:20.000000000 +0000
-+++ b/xml2-config.in	2009-12-17 11:45:36.000000000 +0000
-@@ -1,9 +1,14 @@
- #! /bin/sh
- 
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--includedir=@includedir@
--libdir=@libdir@
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#includedir=@includedir@
-+#libdir=@libdir@
-+
-+prefix=${WORKDIR}/UnpackedTarball/libxml2
-+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2
-+includedir=${WORKDIR}/UnpackedTarball/libxml2/include
-+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs
- cflags=
- libs=
- 
-@@ -67,7 +72,8 @@
- 	;;
- 
-     --cflags)
--        cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+        #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+        cflags="-I${includedir}"
-        	;;
- 
-     --libtool-libs)
-@@ -91,7 +96,8 @@
-             libs="@XML_LIBDIR@ $libs"
-         fi
- 
--        libs="$libs @WIN32_EXTRA_LIBADD@"
-+        #libs="$libs @WIN32_EXTRA_LIBADD@"
-+        libs="-L${libdir} -lxml2 -lm"
-         ;;
- 
-     *)
diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in
new file mode 100644
index 000000000000..164508e47e67
--- /dev/null
+++ b/external/libxml2/xml2-config.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --version)
+	echo @VERSION@
+	exit 0
+        ;;
+    --cflags)
+        cflags="$LIBXML_CFLAGS"
+        ;;
+    --libs)
+        libs="$LIBXML_LIBS"
+        ;;
+    esac
+    shift
+done
+
+if test -n "$cflags$libs"; then
+    echo $cflags $libs
+fi
+
+exit 0
diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index c5ff226168d8..fbdc8b6f5510 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
 	external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \
 	external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 \
 	external/redland/raptor/libtool.patch \
-	external/redland/raptor/libxml-override.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/libxml-override.patch b/external/redland/raptor/libxml-override.patch
deleted file mode 100644
index edc2d0d497a4..000000000000
--- a/external/redland/raptor/libxml-override.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure
-+++ configure
-@@ -14387,8 +14387,8 @@
- 
- libxml_source=no
- if test "X$XML_CONFIG" != "X"; then
--  LIBXML_CFLAGS=`$XML_CONFIG --cflags`
--  LIBXML_LIBS=`$XML_CONFIG --libs`
-+  : ${LIBXML_CFLAGS=`$XML_CONFIG --cflags`}
-+  : ${LIBXML_LIBS=`$XML_CONFIG --libs`}
- 
-   CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS"
-   LIBS="$LIBS $LIBXML_LIBS"
commit 62f64a5a3a02a9fb95a0100d5efe9da0cd05710a
Author:     Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sat May 22 14:20:59 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 12:12:05 2021 +0200

    wasm: Fix linking for clang build
    
    Change-Id: I593ab41a4602cedb6586e428773ed41d7e21f1f4

diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 823190490589..3238ce7a47ba 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -20,7 +20,7 @@ include $(GBUILDDIR)/platform/unxgcc.mk
 gb_STDLIBS :=
 
 ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_STDLIBS += -ldl -lm
+gb_STDLIBS += -ldl -lm -pthread -lpthread
 endif
 
 gb_STDLIBS_CXX :=
commit 2731a28c7750fa383bb09f8c76455f81753ad24b
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu May 27 12:15:53 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 12:12:05 2021 +0200

    wasm: catchall of small fixes and updated README
    
    A bunch of smalll fixes to make the WASM build work.
    
    * Enable the Qt5 WASM mandelbrot example
    * Use non-multiuser DESKTOP build
    * Remove leftover artifacts from configure
    * Disable UNO bridge code
    * Fix numbertext CXXFLAGS
    * Adapt link flags to prevent WASM rewriting
      and use DWARF debug info
    * Include the correct poll.h
    
    Change-Id: If8dcf7646ee57669fec3ab0c222d09782a79ca2c

diff --git a/README.wasm b/README.wasm
index 926f6565452c..21a81d6684a4 100644
--- a/README.wasm
+++ b/README.wasm
@@ -5,31 +5,27 @@ $ emrun --serve_after_close instdir/program/ui-previewer.html
 
 The ui-previewer "binary" will "crash" with memory alignment problems.
 
-You can run the WASM mandelbrot Qt example, if you copy its HTML
-and the qtloader.js from the Qt's example folder after build with:
+You can run the WASM mandelbrot Qt example:
 
-$ emrun --serve_after_close workdir/LinkTarget/Executable/mandelbrot.html
+$ emrun --serve_after_close workdir/LinkTarget/Executable/qt_mandelbrot.html
 
 REMINDER: always start new tabs in the browser, reload might fail / cache!
 
 
 = Setup for the LO WASM build (with Qt) =
 
-We're using Qt 5.15 with the officially supported emscripten v1.39.8.
-But there are several potential problems with threads and exceptions, so this will likely
-change later to a newer emscripten.
+We're using Qt 5.15 with current upstream emscripten, currently 2.0.23.
 
-Qt WASM is not yet used with LO, just if you're wondering!
+++ See below under Docker build for another build option ++
 
- ++ See below under Docker build for another build option ++
 
 == Setup emscripten ==
 
 https://emscripten.org/docs/getting_started/index.html
 
 git clone https://github.com/emscripten-core/emsdk.git
-./emsdk install 1.39.8
-./emsdk activate --embedded 1.39.8
+./emsdk install 2.0.23
+./emsdk activate --embedded 2.0.23
 
 Example bashrc scriptlet:
 
@@ -49,10 +45,21 @@ git clone https://github.com/qt/qt5.git
 cd qt5
 git checkout v5.15.2
 ./init-repository
-./configure -xplatform wasm-emscripten -feature-thread -compile-examples -prefix $PWD/qtbase
-make -j<CORES> module-qtbase module-qtdeclarative
 
-Building with examples will break with some of them, but at that point Qt already works.
+./configure -xplatform wasm-emscripten -feature-thread -prefix $PWD/qtbase
+
+Optionally you can add the configure flag "-compile-examples". But then you also have to
+patch at least mkspecs/wasm-emscripten/qmake.conf with EXIT_RUNTIME=0, otherwise they will
+fail to run. In addition, building with examples will break with some of them, but at that
+point Qt already works and also most examples.
+
+Linking takes quite a long time, because emscripten-finalize rewrites the whole WASM files
+with some options. This way the LO WASM needs at least 64GB RAM. For faster link times add
+"-s WASM_BIGINT=1", change to ASSERTIONS=1 nd use -g3 to prevent rewriting the WASM file
+and generating source maps (see emscripten.py, finalize_wasm, and avoid modify_wasm = True).
+This is just needed for Qt examples, as LO already uses the correct flags!
+
+make -j<CORES> module-qtbase module-qtdeclarative
 
 At some point Qt configure failed for me with:
 "Checking for target architecture... Project ERROR: target architecture detection binary not found."
@@ -74,10 +81,6 @@ autogen.sh is patched to use emconfigure. That basically sets various environmen
 especially EMMAKEN_JUST_CONFIGURE, which will create the correct output file names, checked by
 configure (a.out).
 
-There's a distro config for WASM (work in progress), that gets your
-defaults right (and currently disables a ton of 3rd party stuff which
-is not essential).
-
 Recommended configure setup is thusly:
 
 # grab defaults
@@ -88,7 +91,27 @@ QT5DIR=/dir/of/git_qt5/qtbase
 
 # if you want to use ccache on both sides of the build
 --with-build-platform-configure-options=--enable-ccache
---enable-ccache
+
+# Include all build components, not just the manual list
+#--enable-services-rdb-from-build
+
+-----------
+
+FWIW: it's also possible to build an almost static Linux LibreOffice by just using
+--disable-dynloading. System externals are still linked dynamically, but everything
+else is static. Then there is --enable-wasm-strip for a smaller feature set.
+
+
+== Debugging setup ==
+
+Since a few months you can use DWARF information embedded by LLVM into the WASM to
+debug WASM in Chrome. You need to enable an experimental feature and install an
+additional extension. The whole setup is described in:
+
+https://developer.chrome.com/blog/wasm-debugging-2020/
+
+This way you don't need source maps (much faster linking!) and can resolve local WASM
+variables to C++ names!
 
 
 == Using Docker to cross-build with emscripten ==
diff --git a/Repository.mk b/Repository.mk
index c2744d8ad206..e384d5fdd32c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
     mtfdemo \
     visualbackendtest \
 	$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), gtktiledviewer) \
+    $(if $(filter EMSCRIPTEN,$(OS)),wasm-qt5-mandelbrot) \
 ))
 
 $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 58d706f2f1ac..881df1a9b3c5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3088,7 +3088,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
 	$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
 	$(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
 	$(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
-    $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
+    $(if $(and $(DISABLE_DYNLOADING),$(WITH_GSSAPI)),$(GSSAPI_LIBS)) \
 )
 
 endif # !WNT
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 9aaedfd66ee8..b26979a4b225 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -184,6 +184,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	uui \
 	vbahelper \
 	vcl \
+    $(if $(filter EMSCRIPTEN,$(OS)),wasm-qt) \
 	wizards \
 	writerfilter \
 	writerperfect \
diff --git a/configure.ac b/configure.ac
index 13da4ecffbf6..d88d83040895 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2953,10 +2953,12 @@ dnl "desktop" one but a "mobile" one, we are always cross-compiling.
 dnl Note the direction of the implication; there is no assumption that
 dnl cross-compiling would imply a non-desktop OS.
 
-if test $_os != iOS -a $_os != Android -a $_os != Emscripten -a "$enable_fuzzers" != "yes"; then
+if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
     BUILD_TYPE="$BUILD_TYPE DESKTOP"
     AC_DEFINE(HAVE_FEATURE_DESKTOP)
-    AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+    if test "$_os" != Emscripten; then
+        AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+    fi
 fi
 
 # explicitly doesn't include enable_gtk3=no and enable_qt5=yes, so it should
@@ -2991,6 +2993,7 @@ if test "$enable_wasm_strip" = "yes"; then
     enable_xmlhelp=no
     enable_zxing=no
     test_libepubgen=no
+#    with_system_libxml=no
     with_galleries=no
     with_webdav=no
     with_x=no
@@ -14584,4 +14587,7 @@ if test -f "$WARNINGS_FILE"; then
     cat "$WARNINGS_FILE"
 fi
 
+# Remove unneeded emconfigure artifacts
+rm -f a.out a.wasm a.out.js a.out.wasm
+
 dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 03dbc99eafcc..b24a81bf5ac9 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1012,6 +1012,7 @@ void EnvironmentsData::getRegisteredEnvironments(
 bool loadEnv(OUString const  & cLibStem,
                     uno_Environment * pEnv)
 {
+#ifndef __EMSCRIPTEN__
 #ifdef DISABLE_DYNLOADING
     uno_initEnvironmentFunc fpInit;
 
@@ -1051,6 +1052,11 @@ bool loadEnv(OUString const  & cLibStem,
 
     (*fpInit)( pEnv ); // init of environment
     return true;
+#else
+    (void)cLibStem;
+    (void)pEnv;
+    return false;
+#endif
 }
 
 }
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 685bf6d4a2a8..03ab13ae7e0d 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -328,8 +328,10 @@ static void setNegativeBridge( const OUString & rBridgeName )
 
 static uno_ext_getMappingFunc selectMapFunc( const OUString & rBridgeName )
 {
+#ifndef EMSCRIPTEN
     if (rBridgeName.equalsAscii( CPPU_CURRENT_LANGUAGE_BINDING_NAME "_uno" ))
         return CPPU_ENV_uno_ext_getMapping;
+#endif
 #if HAVE_FEATURE_JAVA
     if (rBridgeName.equalsAscii( "java" "_uno" ))
         return java_uno_ext_getMapping;
diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 3094351aebf2..eae3f34dc412 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libnumbertext,\
 	build \
 ))
 
-libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11)
+libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11) $(gb_EMSCRIPTEN_CPPFLAGS)
 
 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD,$(OS)))
 ifneq (,$(gb_ENABLE_DBGUTIL))
diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk
index 193c46f3d75d..cb373f99982a 100644
--- a/shell/Module_shell.mk
+++ b/shell/Module_shell.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Module_add_targets,shell,\
 ))
 endif
 
+ifeq (,$(filter EMSCRIPTEN,$(OS)))
 ifeq ($(filter DESKTOP,$(BUILD_TYPE)),DESKTOP)
 
 $(eval $(call gb_Module_add_targets,shell,\
@@ -111,17 +112,16 @@ $(eval $(call gb_Module_add_targets,shell,\
 ))
 
 ifneq ($(OS),WNT)
-
 $(eval $(call gb_Module_add_targets,shell,\
 	StaticLibrary_xmlparser \
 	Executable_uri_encode \
 	Library_cmdmail \
 	$(if $(ENABLE_MACOSX_SANDBOX),,Package_senddoc) \
 ))
-
 endif
 
-endif
+endif # DESKTOP
+endif # !EMSCRIPTEN
 
 $(eval $(call gb_Module_add_l10n_targets,shell,\
     AllLangMoTarget_shell \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 3a7441454f0d..0c4c33bd6241 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -14,7 +14,10 @@ include $(GBUILDDIR)/platform/unxgcc.mk
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
 # avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
 gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=2 -s EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
+# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
+# See emscrypten.py, finalize_wasm, modify_wasm = True
+# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
 gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
 gb_Executable_EXT := .html
@@ -27,8 +30,10 @@ gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb
 # Linker and compiler optimize + debug flags are handled in LinkTarget.mk
 gb_LINKEROPTFLAGS :=
 gb_LINKERSTRIPDEBUGFLAGS :=
-# This maps to g4, AKA source maps. The LO default would otherwise be g2!
-gb_DEBUGINFO_FLAGS = -g
+# This maps to g3, no source maps, but DWARF with current emscripten!
+# https://developer.chrome.com/blog/wasm-debugging-2020/
+gb_DEBUGINFO_FLAGS = -g3
+#gb_DEBUGINFO_FLAGS = -gsource-map --source-map-base=file://$(WORKDIR)/LinkTarget/Executable
 # We need at least code elimination, otherwise linking OOMs even with 64GB.
 # So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure.
 gb_COMPILERDEBUGOPTFLAGS := -O1
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 700c6b87f645..3534a3925150 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -27,7 +27,11 @@
 #include <fcntl.h>
 #include <pthread.h>
 #include <sys/time.h>
+#ifdef EMSCRIPTEN
+#include <poll.h>
+#else
 #include <sys/poll.h>
+#endif
 
 #include <sal/types.h>
 #include <sal/log.hxx>
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 06dbaf6c5f32..5464754bab56 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -19,10 +19,6 @@
 
 #include <impglyphitem.hxx>
 
-#if (defined UNX && !defined MACOSX && !defined IOS)
-#include <unx/freetype_glyphcache.hxx>
-#endif
-
 SalLayoutGlyphs::SalLayoutGlyphs() {}
 
 SalLayoutGlyphs::~SalLayoutGlyphs() {}
diff --git a/wasm-qt/Module_wasm-qt.mk b/wasm-qt/Module_wasm-qt.mk
index 8e86df4e8baa..72da667363aa 100644
--- a/wasm-qt/Module_wasm-qt.mk
+++ b/wasm-qt/Module_wasm-qt.mk
@@ -8,13 +8,9 @@
 
 $(eval $(call gb_Module_Module,wasm-qt))
 
-ifeq ($(OS),EMSCRIPTEN)
-
 $(eval $(call gb_Module_add_targets,wasm-qt,\
     CustomTarget_wasm-qt5-mandelbrot_moc \
     Executable_wasm-qt5-mandelbrot \
 ))
 
-endif
-
 # vim: set noet sw=4 ts=4:
commit 39e258711f3153ae4caa4227993f243d5786afe5
Author:     Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
AuthorDate: Fri Apr 30 17:26:41 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Jun 22 12:12:04 2021 +0200

    wasm strip: squashed patches from Armin + fixes
    
    In addition to the squashed patches, this patch
    
    * drops the global compiler defines in favour of a config header
      file, for better ccache usage
    * revers almost all header changes in favour for empty function
      calls (just keeüs the premultiply table drop)
    * some additional changes for unused function calls
    * adapts more component files, so building the services.db and
      the component_mao.cxx from the build still works
    
    Currently crashs with anything different then soffice --writer.
    Closing the document also crashes.
    
    bfee2970a79e Wasm strip some SW exports & corrections
    fac2aeca4010 Wasm optional premultiply table replace
    ec9e2c81b4ec Wasm remove hunspell/hyphen optionally
    302a6f6f777a Wasm LanguageGuess optional removal
    55404a55984c Wasm oprtional autorecovery remove additions
    640d53e1e7c1 Wasm optional EPUB removal
    4a09f57c132c Wasm strip: remove UcpHelp
    eeebc1383df7 Wasm optional accessibility removal
    b95eaa630273 Additions/corrections to dbaccess wasm removal
    d8c11d72aa5a Wasm: Removed dbaccess optional
    f7d462b61c08 WASM Removal of clucene
    a1c508fc1c41 Stripped canvas/cppcanvas and related
    ebfb45f46319 Use more expressive ENABLE_WASM_STRIP markers
    a3519b1a41c8 Disable wpftcalc for wasm reduction
    fa86c5bc36f7 Chart wasm optional removal
    90d9a8dee35a BackingWindow (RecentDocsView) optional removal
    68e5f972b1a6 Deeper TipOfTheDay optional removal
    4ed18d09ce07 Optional removal of more startup-modules
    ab8d809b6ab7 Remove RecoveryCore
    f82517838840 Remove RecoveryUI, correct spl stuff
    f38dca150d58 SplashScreen and Startup
    
    Not included:
    34243e3acfe8 Wasm correct unresolved CreateMediaTempFile
    10963e79ac7d Wasm optional reduce created locales
    
    Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7

diff --git a/Repository.mk b/Repository.mk
index 608abbf91001..c2744d8ad206 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 \
@@ -90,6 +95,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 \
@@ -143,7 +154,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
 	$(call gb_Helper_optional,FUZZERS,mtpfuzzer) \
 	$(call gb_Helper_optional,FUZZERS,htmlfuzzer) \
 	$(call gb_Helper_optional,FUZZERS,sftfuzzer) \
-	$(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
 	soffice_bin \
 	$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
 	$(if $(filter WNT,$(OS)), \
@@ -329,6 +339,43 @@ $(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_CLUCENE),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+    $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \
+))
+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, \
@@ -342,14 +389,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 \
@@ -362,8 +405,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
 	$(if $(USING_X11),desktop_detector) \
 	$(call gb_Helper_optional,SCRIPTING,dlgprov) \
-	$(if $(filter WNT,$(OS)),directx9canvas) \
-	$(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
 	drawinglayer \
 	editeng \
 	$(if $(filter WNT,$(OS)),emser) \
@@ -379,19 +420,14 @@ $(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 \
@@ -420,11 +456,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 \
@@ -454,7 +488,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 		vbahelper \
 	) \
 	vcl \
-	vclcanvas \
 	writerperfect \
 	xmlscript \
 	xmlfa \
@@ -475,9 +508,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, \
@@ -614,6 +644,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
     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) \
@@ -658,7 +696,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
 		fps \
 		inprocserv \
 		UAccCOM \
-		winaccessibility \
 	) \
 ))
 
@@ -891,6 +928,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 \
@@ -974,13 +1023,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)), \
@@ -1170,9 +1217,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 \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index d6fa19cfbf30..58d706f2f1ac 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -551,6 +551,7 @@ endef
 gb_ExternalProject__use_hunspell :=
 
 else # !SYSTEM_HUNSPELL
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
 
 define gb_LinkTarget__use_hunspell
 $(call gb_LinkTarget_add_defs,$(1),\
@@ -578,6 +579,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell)
 
 endef
 
+endif # ENABLE_WASM_STRIP_HUNSPELL
 endif # SYSTEM_HUNSPELL
 
 
@@ -1884,6 +1886,7 @@ endef
 gb_ExternalProject__use_epubgen :=
 
 else # !SYSTEM_EPUBGEN
+ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
 
 define gb_LinkTarget__use_epubgen
 $(call gb_LinkTarget_set_include,$(1),\
@@ -1901,6 +1904,7 @@ $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
 
 endef
 
+endif # ENABLE_WASM_STRIP_EPUB
 endif # SYSTEM_EPUBGEN
 
 ifneq ($(SYSTEM_REVENGE),)
@@ -2842,7 +2846,6 @@ endif # SYSTEM_POPPLER
 
 endif # ENABLE_POPPLER
 
-
 ifneq ($(SYSTEM_CLUCENE),)
 
 define gb_LinkTarget__use_clucene
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 64d9788b59e4..9aaedfd66ee8 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -20,8 +20,35 @@ $(eval $(call gb_Module_add_targets,libreoffice,\
 ))
 endif
 
+# WASM_CHART change
+ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+	chart2 \
+))
+endif
+
+# WASM_CANVAS change
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+	canvas \
+	cppcanvas \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+	dbaccess \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	accessibility \
+	winaccessibility \
+))
+endif
+
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	android \
     $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
 	animations \
@@ -36,19 +63,15 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	bean \
 	binaryurp \
 	bridges \
-	canvas \
-	chart2 \
 	cli_ure \
 	$(call gb_Helper_optional,DESKTOP,codemaker) \
 	comphelper \
 	configmgr \
 	connectivity \
-	cppcanvas \
 	cppu \
 	cppuhelper \
 	cpputools \
 	cui \
-	dbaccess \
 	desktop \
 	$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
 	drawinglayer \
@@ -121,7 +144,9 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	$(call gb_Helper_optional,DESKTOP,setup_native) \
 	sfx2 \
 	shell \
+    $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
 	slideshow \
+    ) \
 	smoketest \
 	solenv \
 	soltools \
@@ -159,7 +184,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	uui \
 	vbahelper \
 	vcl \
-	winaccessibility \
 	wizards \
 	writerfilter \
 	writerperfect \
diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index f874dfe9cc54..122ae4a909a3 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -62,9 +62,14 @@ $(eval $(call gb_Library_use_libraries,basctl,\
 	xmlscript \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Library_add_exception_objects,basctl,\
 	basctl/source/accessibility/accessibledialogcontrolshape \
 	basctl/source/accessibility/accessibledialogwindow \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,basctl,\
 	basctl/source/basicide/basdoc \
 	basctl/source/basicide/IDEComboBox \
 	basctl/source/basicide/basicrenderable \
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 05f031415213..7eddba17f348 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\
 
 $(eval $(call gb_Library_set_componentfile,chartcontroller,chart2/source/controller/chartcontroller))
 
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/accessibility/AccessibleBase \
     chart2/source/controller/accessibility/AccessibleChartElement \
@@ -60,6 +61,10 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/accessibility/AccessibleTextHelper \
     chart2/source/controller/accessibility/AccessibleViewForwarder \
     chart2/source/controller/accessibility/ChartElementFactory \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,chartcontroller,\
     chart2/source/controller/chartapiwrapper/AreaWrapper \
     chart2/source/controller/chartapiwrapper/AxisWrapper \
     chart2/source/controller/chartapiwrapper/Chart2ModelContact \
diff --git a/config_host.mk.in b/config_host.mk.in
index 487e1d08b311..4f56771cc8af 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -206,7 +206,23 @@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@
 export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@
 export ENABLE_VALGRIND=@ENABLE_VALGRIND@
 export ENABLE_WASM_STRIP=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CHART=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CLUCENE=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_DBACCESS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_EPUB=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_EXTRA=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_GUESSLANG=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_HUNSPELL=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SPLASH=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@
 export ENABLE_WERROR=@ENABLE_WERROR@
 export ENDIANNESS=@ENDIANNESS@
 export EPM=@EPM@
diff --git a/config_host/config_wasm_strip.h.in b/config_host/config_wasm_strip.h.in
new file mode 100644
index 000000000000..864fa4dc29ea
--- /dev/null
+++ b/config_host/config_wasm_strip.h.in
@@ -0,0 +1,24 @@
+#ifndef CONFIG_FEATURE_WASM_STRIP_H
+#define CONFIG_FEATURE_WASM_STRIP_H
+
+#define HAVE_FEATURE_WASM_STRIP 0
+
+#if HAVE_FEATURE_WASM_STRIP
+#define ENABLE_WASM_STRIP_ACCESSIBILITY
+#define ENABLE_WASM_STRIP_CANVAS
+#define ENABLE_WASM_STRIP_CHART
+#define ENABLE_WASM_STRIP_CLUCENE
+#define ENABLE_WASM_STRIP_DBACCESS
+#define ENABLE_WASM_STRIP_EPUB
+#define ENABLE_WASM_STRIP_EXTRA
+#define ENABLE_WASM_STRIP_GUESSLANG
+#define ENABLE_WASM_STRIP_HUNSPELL
+#define ENABLE_WASM_STRIP_PINGUSER
+#define ENABLE_WASM_STRIP_PREMULTIPLY
+#define ENABLE_WASM_STRIP_RECENT
+#define ENABLE_WASM_STRIP_RECOVERYUI
+#define ENABLE_WASM_STRIP_SPLASH
+#define ENABLE_WASM_STRIP_SWEXPORTS
+#endif
+
+#endif
diff --git a/configure.ac b/configure.ac
index fe4cd5160f62..13da4ecffbf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2997,6 +2997,8 @@ if test "$enable_wasm_strip" = "yes"; then
 
     test "${with_fonts+set}" = set || with_fonts=yes
     test "${with_locales+set}" = set || with_locales=en
+
+    AC_DEFINE(HAVE_FEATURE_WASM_STRIP)
 fi
 
 ENABLE_SERVICES_RDB_FROM_BUILD=
@@ -14472,6 +14474,7 @@ AC_CONFIG_HEADERS([config_host/config_oauth2.h])
 AC_CONFIG_HEADERS([config_host/config_poppler.h])
 AC_CONFIG_HEADERS([config_host/config_python.h])
 AC_CONFIG_HEADERS([config_host/config_writerperfect.h])
+AC_CONFIG_HEADERS([config_host/config_wasm_strip.h])
 AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h])
 AC_OUTPUT
 
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 0d6b736aa0eb..6383a0b34bd6 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -93,6 +93,18 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 ))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_Library_add_exception_objects,cui,\
+    cui/source/dialogs/tipofthedaydlg \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Library_add_exception_objects,cui,\
+    cui/source/dialogs/hyphen \
+))
+endif
+
 $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/customize/acccfg \
     cui/source/customize/cfg \
@@ -126,9 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/dialogs/hlmailtp \
     cui/source/dialogs/hlmarkwn \
     cui/source/dialogs/hltpbase \
-    cui/source/dialogs/hyphen \
     cui/source/dialogs/iconcdlg \
-    cui/source/dialogs/tipofthedaydlg \
     cui/source/dialogs/insdlg \
     cui/source/dialogs/insrc \
     cui/source/dialogs/linkdlg \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index c6d9d1584a66..0cb2049d512d 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -15,6 +15,12 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 ))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_UIConfig_add_uifiles,cui,\
+	cui/uiconfig/ui/tipofthedaydialog \
+))
+endif
+
 $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/aboutdialog \
 	cui/uiconfig/ui/aboutconfigdialog\
@@ -96,7 +102,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/hyphenate \
 	cui/uiconfig/ui/iconchangedialog \
 	cui/uiconfig/ui/iconselectordialog \
-	cui/uiconfig/ui/tipofthedaydialog \
 	cui/uiconfig/ui/insertfloatingframe \
 	cui/uiconfig/ui/insertoleobject \
 	cui/uiconfig/ui/insertrowcolumn \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 19b30518e426..732617195933 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <config_extensions.h>
+#include <config_wasm_strip.h>
 
 #include <align.hxx>
 #include "dlgfact.hxx"
@@ -134,7 +135,11 @@ short AbstractFmShowColsDialog_Impl::Execute()
 
 short AbstractHyphenWordDialog_Impl::Execute()
 {
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
     return m_xDlg->run();
+#else
+    return 0;
+#endif
 }
 
 short AbstractThesaurusDialog_Impl::Execute()
@@ -1095,7 +1100,16 @@ VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDia
                                                 css::uno::Reference< css::linguistic2::XHyphenator >  &xHyphen,
                                                 SvxSpellWrapper* pWrapper)
 {
+#ifndef ENABLE_WASM_STRIP_EXTRA
     return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper));
+#else
+    (void) pParent;
+    (void) rWord;
+    (void) nLang;
+    (void) xHyphen;
+    (void) pWrapper;
+    return nullptr;
+#endif
 }
 
 VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent)
@@ -1683,7 +1697,7 @@ VclPtr<AbstractAdditionsDialog> AbstractDialogFactory_Impl::CreateAdditionsDialo
 #else
     (void) pParent;
     (void) sAdditionsTag;
-    return VclPtr<AbstractAdditionsDialog>(nullptr);
+    return nullptr;
 #endif
 }
 
@@ -1697,8 +1711,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
 VclPtr<VclAbstractDialog>
 AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
 {
+#ifndef ENABLE_WASM_STRIP_PINGUSER
     return VclPtr<CuiAbstractTipController_Impl>::Create(
         std::make_shared<TipOfTheDayDialog>(pParent));
+#else
+    (void) pParent;
+    return nullptr;
+#endif
 }
 
 VclPtr<VclAbstractDialog>
diff --git a/desktop/Library_deployment.mk b/desktop/Library_deployment.mk
index 57fe1c55a0b6..dc36691b63b1 100644
--- a/desktop/Library_deployment.mk
+++ b/desktop/Library_deployment.mk
@@ -39,6 +39,15 @@ $(eval $(call gb_Library_use_libraries,deployment,\
 
 $(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment))
 
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment.extended))
+
+$(eval $(call gb_Library_add_exception_objects,deployment,\
+    desktop/source/deployment/registry/help/dp_help \
+    desktop/source/deployment/registry/component/dp_component \
+))
+endif
+
 $(eval $(call gb_Library_add_exception_objects,deployment,\
     desktop/source/deployment/dp_log \
     desktop/source/deployment/dp_persmap \
@@ -51,7 +60,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
     desktop/source/deployment/manager/dp_managerfac \
     desktop/source/deployment/manager/dp_properties \
     desktop/source/deployment/registry/component/dp_compbackenddb \
-    desktop/source/deployment/registry/component/dp_component \
     desktop/source/deployment/registry/configuration/dp_configuration \
     desktop/source/deployment/registry/configuration/dp_configurationbackenddb \
     desktop/source/deployment/registry/dp_backend \
@@ -59,7 +67,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
     desktop/source/deployment/registry/dp_registry \
     desktop/source/deployment/registry/executable/dp_executable \
     desktop/source/deployment/registry/executable/dp_executablebackenddb \
-    desktop/source/deployment/registry/help/dp_help \
     desktop/source/deployment/registry/help/dp_helpbackenddb \
     desktop/source/deployment/registry/package/dp_extbackenddb \
     desktop/source/deployment/registry/package/dp_package \
@@ -71,11 +78,9 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
 ))
 
 ifneq (,$(filter XMLHELP,$(BUILD_TYPE)))
-
 $(eval $(call gb_Library_use_libraries,deployment,\
     helplinker \
 ))
-
 endif
 
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 3be81056aad9..265f0248534e 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
     $(if $(ENABLE_BREAKPAD), \
         Library_crashreport \
         ) \
-    $(if $(DISABLE_GUI),,Library_spl) \
+    $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,Library_spl) \
     Package_branding \
     $(if $(CUSTOM_BRAND_DIR),Package_branding_custom) \
     UIConfig_deployment \
@@ -107,9 +107,11 @@ $(eval $(call gb_Module_add_targets,desktop,\
 
 else ifeq (,$(filter MACOSX ANDROID iOS HAIKU,$(OS)))
 
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Module_add_targets,desktop,\
     $(if $(DISABLE_DYNLOADING),,Executable_oosplash) \
 ))
+endif # ENABLE_WASM_STRIP_ACCESSIBILITY
 
 endif
 
diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk
index d0a0e689c2d2..96d5fe49f919 100644
--- a/desktop/Pagein_common.mk
+++ b/desktop/Pagein_common.mk
@@ -9,6 +9,12 @@
 
 $(eval $(call gb_Pagein_Pagein,common))
 
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Pagein_add_objects,common,\
+    helplinker \
+))
+endif
+
 # sorted in approx. reverse load order (ld.so.1)
 $(eval $(call gb_Pagein_add_objects,common,\
     $(if $(MERGELIBS),merged) \
@@ -56,7 +62,6 @@ $(eval $(call gb_Pagein_add_objects,common,\
     svt \
     spl \
     avmedia \
-    helplinker \
     sax \
     fsstorage \
     desktopbe1 \
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 42a687b69088..2c39d0d24d3c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -24,6 +24,7 @@
 #include <config_java.h>
 #include <config_folders.h>
 #include <config_extensions.h>
+#include <config_wasm_strip.h>
 
 #include <sal/config.h>
 
@@ -969,6 +970,7 @@ struct RefClearGuard
     @param  bEmergencySave
             differs between EMERGENCY_SAVE and RECOVERY
 */
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
 bool impl_callRecoveryUI(bool bEmergencySave     ,
                          bool bExistsRecoveryData)
 {
@@ -1000,6 +1002,7 @@ bool impl_callRecoveryUI(bool bEmergencySave     ,
     aRet >>= bRet;
     return bRet;
 }
+#endif
 
 bool impl_bringToFrontRecoveryUI()
 {
@@ -1149,9 +1152,11 @@ void Desktop::Exception(ExceptionCategory nCategory)
         // Save all open documents so they will be reopened
         // the next time the application is started
         // returns true if at least one document could be saved...
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
         bRestart = impl_callRecoveryUI(
                         true , // force emergency save
                         false);
+#endif
     }
 
     FlushConfiguration();
@@ -1165,8 +1170,10 @@ void Desktop::Exception(ExceptionCategory nCategory)
             osl_removeSignalHandler( pSignalHandler );
 
         restartOnMac(false);
+#ifndef ENABLE_WASM_STRIP_SPLASH
         if ( m_rSplashScreen.is() )
             m_rSplashScreen->reset();
+#endif
 
         _exit( EXITHELPER_CRASH_WITH_RESTART );
     }
@@ -1269,7 +1276,9 @@ int Desktop::Main()
     Translate::SetReadStringHook(ReplaceStringHookProc);
 
     // Startup screen
+#ifndef ENABLE_WASM_STRIP_SPLASH
     OpenSplashScreen();
+#endif
 
     SetSplashScreenProgress(10);
 
@@ -1712,8 +1721,10 @@ int Desktop::doShutdown()
     if ( bRR )
     {
         restartOnMac(true);
+#ifndef ENABLE_WASM_STRIP_SPLASH
         if ( m_rSplashScreen.is() )
             m_rSplashScreen->reset();
+#endif
 
         return EXITHELPER_NORMAL_RESTART;
     }
@@ -2007,8 +2018,9 @@ void Desktop::OpenClients()
     }
     else
     {
-        bool bCrashed            = false;
         bool bExistsRecoveryData = false;
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
+        bool bCrashed            = false;
         bool bExistsSessionData  = false;
         bool const bDisableRecovery
             = getenv("OOO_DISABLE_RECOVERY") != nullptr
@@ -2034,6 +2046,7 @@ void Desktop::OpenClients()
                 TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery");
             }
         }
+#endif
 
         Reference< XSessionManagerListener2 > xSessionListener;
         try
@@ -2392,6 +2405,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
     }
 }
 
+#ifndef ENABLE_WASM_STRIP_SPLASH
 void Desktop::OpenSplashScreen()
 {
     const CommandLineArgs &rCmdLine = GetCommandLineArgs();
@@ -2441,33 +2455,43 @@ void Desktop::OpenSplashScreen()
 
     if(m_rSplashScreen.is())
             m_rSplashScreen->start("SplashScreen", 100);
-
 }
+#endif
 
 void Desktop::SetSplashScreenProgress(sal_Int32 iProgress)
 {
+#ifdef ENABLE_WASM_STRIP_SPLASH
+    (void) iProgress;
+#else
     if(m_rSplashScreen.is())
     {
         m_rSplashScreen->setValue(iProgress);
     }
+#endif
 }
 
 void Desktop::SetSplashScreenText( const OUString& rText )
 {
+#ifdef ENABLE_WASM_STRIP_SPLASH
+    (void) rText;
+#else
     if( m_rSplashScreen.is() )
     {
         m_rSplashScreen->setText( rText );
     }
+#endif
 }
 
 void Desktop::CloseSplashScreen()
 {
+#ifndef ENABLE_WASM_STRIP_SPLASH
     if(m_rSplashScreen.is())
     {
         SolarMutexGuard ensureSolarMutex;
         m_rSplashScreen->end();
         m_rSplashScreen = nullptr;
     }
+#endif
 }
 
 
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 4d5a3bb78396..6c64502e9d38 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -275,6 +275,26 @@ CommandLineArgs::CommandLineArgs( Supplier& supplier )
 
 void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
 {
+#ifdef ENABLE_WASM_STRIP
+    // use hard-coded init-params for wasm '-nolockcheck -norestore -nologo -writer'
+    // no restore tries
+    m_norestore = true;
+    // no logo needed
+    m_nologo = true;
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
+    // no lock-checks needed
+    m_nolockcheck = true;
+#endif
+    // start with writer only
+    m_writer = true;
+    m_bDocumentArgs = true;
+
+    m_bEmpty = false;
+
+    // return to avoid #elif
+    return;
+#endif
+
     m_cwdUrl = supplier.getCwdUrl();
     CommandLineEvent eCurrentEvent = CommandLineEvent::Open;
 
diff --git a/desktop/source/deployment/deployment.component b/desktop/source/deployment/deployment.component
index f7a481bf43c9..79c966deadc0 100644
--- a/desktop/source/deployment/deployment.component
+++ b/desktop/source/deployment/deployment.component
@@ -38,10 +38,6 @@
     constructor="com_sun_star_comp_deployment_ProgressLog_get_implementation">
     <service name="com.sun.star.comp.deployment.ProgressLog"/>
   </implementation>
-  <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend"
-    constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation">
-    <service name="com.sun.star.deployment.PackageRegistryBackend"/>
-  </implementation>
   <implementation name="com.sun.star.comp.deployment.configuration.PackageRegistryBackend"
     constructor="com_sun_star_comp_deployment_configuration_PackageRegistryBackend_get_implementation">
     <service name="com.sun.star.deployment.PackageRegistryBackend"/>
@@ -50,10 +46,6 @@
     constructor="com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation">
     <service name="com.sun.star.deployment.PackageRegistryBackend"/>
   </implementation>
-  <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend"
-    constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation">
-    <service name="com.sun.star.deployment.PackageRegistryBackend"/>
-  </implementation>
   <implementation name="com.sun.star.comp.deployment.script.PackageRegistryBackend"
     constructor="com_sun_star_comp_deployment_script_PackageRegistryBackend_get_implementation">
     <service name="com.sun.star.deployment.PackageRegistryBackend"/>
diff --git a/desktop/source/deployment/deployment.extended.component b/desktop/source/deployment/deployment.extended.component
new file mode 100644
index 000000000000..8d0b70a9c028
--- /dev/null
+++ b/desktop/source/deployment/deployment.extended.component
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend"
+    constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation">
+    <service name="com.sun.star.deployment.PackageRegistryBackend"/>
+  </implementation>
+  <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend"
+    constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation">
+    <service name="com.sun.star.deployment.PackageRegistryBackend"/>
+  </implementation>
+</component>
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 43a42b83b42c..06c803f5bd37 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -29,11 +29,16 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\
 	libxml2 \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
 $(eval $(call gb_Library_use_libraries,drawinglayer,\
-    basegfx \
     canvastools \
-    comphelper \
     cppcanvas \
+))
+endif
+
+$(eval $(call gb_Library_use_libraries,drawinglayer,\
+    basegfx \
+    comphelper \
     cppu \
     cppuhelper \
     i18nlangtag \
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index 1237954ad6e9..6602793e3e02 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_add_defs,editeng,\
 
 $(eval $(call gb_Library_use_sdk_api,editeng))
 
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Library_add_exception_objects,editeng,\
     editeng/source/accessibility/AccessibleComponentBase \
     editeng/source/accessibility/AccessibleContextBase \
@@ -45,6 +46,10 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\
     editeng/source/accessibility/AccessibleSelectionBase \
     editeng/source/accessibility/AccessibleStaticTextBase \
     editeng/source/accessibility/AccessibleStringWrap \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,editeng,\
     editeng/source/editeng/editattr \
     editeng/source/editeng/editdata \
     editeng/source/editeng/editdbg \
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index b51c9c97b613..ef3d7bb89ac0 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_wasm_strip.h>
+
 #include <rtl/ustring.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <vcl/svapp.hxx>
@@ -249,6 +251,9 @@ void SvxSpellWrapper::InsertHyphen( const sal_Int32 )
 // Testing of the document areas in the order specified by the flags
 void SvxSpellWrapper::SpellDocument( )
 {
+#ifdef ENABLE_WASM_STRIP_HUNSPELL
+    return;
+#else
     if ( bOtherCntnt )
     {
         bReverse = false;
@@ -275,6 +280,7 @@ void SvxSpellWrapper::SpellDocument( )
                         xHyph, this ));
         pDlg->Execute();
     }
+#endif
 }
 
 
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 4566d825301c..6d015590587e 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -13,6 +13,18 @@ ifeq ($(COM),MSC)
 $(eval $(call gb_Module_add_moduledir,external,msc-externals))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Module_add_moduledirs,external,\
+	$(call gb_Helper_optional,CLUCENE,clucene) \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
+$(eval $(call gb_Module_add_moduledirs,external,\
+	$(call gb_Helper_optional,EPUBGEN,libepubgen) \
+))
+endif
+
 $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,XMLSEC,xmlsec) \
 	$(call gb_Helper_optional,ABW,libabw) \
@@ -25,7 +37,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,CAIRO,cairo) \
 	$(call gb_Helper_optional,CDR,libcdr) \
 	$(call gb_Helper_optional,OPENCL,clew) \
-	$(call gb_Helper_optional,CLUCENE,clucene) \
 	$(call gb_Helper_optional,LIBCMIS,libcmis) \
 	$(call gb_Helper_optional,COINMP,coinmp) \
 	$(call gb_Helper_optional,CPPUNIT,cppunit) \
@@ -35,7 +46,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,EBOOK,libebook) \
 	$(call gb_Helper_optional,EPM,epm) \
 	$(call gb_Helper_optional,EPOXY,epoxy) \
-	$(call gb_Helper_optional,EPUBGEN,libepubgen) \
 	$(call gb_Helper_optional,ETONYEK,libetonyek) \
 	$(call gb_Helper_optional,EXPAT,expat) \
 	$(call gb_Helper_optional,FIREBIRD,firebird) \
diff --git a/external/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk
index 02d534f69169..3a2eccafb0aa 100644
--- a/external/hunspell/StaticLibrary_hunspell.mk
+++ b/external/hunspell/StaticLibrary_hunspell.mk
@@ -20,6 +20,12 @@ $(eval $(call gb_StaticLibrary_add_defs,hunspell,\
 	-DOPENOFFICEORG \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
+	UnpackedTarball/hunspell/src/hunspell/hunspell \
+))
+endif
+
 $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
 	UnpackedTarball/hunspell/src/hunspell/affentry \
 	UnpackedTarball/hunspell/src/hunspell/affixmgr \
@@ -30,7 +36,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
 	UnpackedTarball/hunspell/src/hunspell/hunzip \
 	UnpackedTarball/hunspell/src/hunspell/filemgr \
 	UnpackedTarball/hunspell/src/hunspell/replist \
-	UnpackedTarball/hunspell/src/hunspell/hunspell \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/hyphen/ExternalProject_hyphen.mk b/external/hyphen/ExternalProject_hyphen.mk
index 63d167f7804b..1419c9b02890 100644
--- a/external/hyphen/ExternalProject_hyphen.mk
+++ b/external/hyphen/ExternalProject_hyphen.mk
@@ -9,7 +9,9 @@
 
 $(eval $(call gb_ExternalProject_ExternalProject,hyphen))
 
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
 $(eval $(call gb_ExternalProject_use_external,hyphen,hunspell))
+endif
 
 $(eval $(call gb_ExternalProject_register_targets,hyphen,\
 	build \
diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk
index 298607f0aa73..6a1e9b14e882 100644
--- a/external/mythes/ExternalProject_mythes.mk
+++ b/external/mythes/ExternalProject_mythes.mk
@@ -9,7 +9,9 @@
 
 $(eval $(call gb_ExternalProject_ExternalProject,mythes))
 
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
 $(eval $(call gb_ExternalProject_use_external,mythes,hunspell))
+endif
 
 $(eval $(call gb_ExternalProject_register_targets,mythes,\
 	build \
diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index cf7177c21180..516209c5df49 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -61,7 +61,7 @@ $(eval $(call gb_Module_add_l10n_targets,extras,\
 ifneq ($(WITH_GALLERY_BUILD),)
 $(eval $(call gb_Module_add_targets,extras,\
 	Gallery_backgrounds \
-	Gallery_sound \
+    $(call gb_Helper_optional,AVMEDIA,Gallery_sound) \
 ))
 endif
 
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index a1a8978e04ff..6e28a4da9a33 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_wasm_strip.h>
+
 #include "impdialog.hxx"
 #include <strings.hrc>
 #include <officecfg/Office/Common.hxx>
@@ -349,7 +351,7 @@ short ImpPDFTabDialog::Ok( )
 {
     // here the whole mechanism of the base class is not used
     // when Ok is hit, the user means 'convert to PDF', so simply close with ok
-
+#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY
     if (getGeneralPage()->IsPdfUaSelected())
     {
         SfxObjectShell* pShell = SfxObjectShell::GetShellFromComponent(mrDoc);
@@ -363,6 +365,8 @@ short ImpPDFTabDialog::Ok( )
             }
         }
     }
+#endif
+
     return RET_OK;
 }
 
diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk
index 2d4fdda1c1ef..1f2f9c1aaff2 100644
--- a/framework/Library_fwk.mk
+++ b/framework/Library_fwk.mk
@@ -61,6 +61,12 @@ $(eval $(call gb_Library_use_libraries,fwk,\
     vcl \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE)
+$(eval $(call gb_Library_add_exception_objects,fwk,\
+    framework/source/services/autorecovery \
+))
+endif
+
 $(eval $(call gb_Library_add_exception_objects,fwk,\
     framework/source/accelerators/acceleratorcache \
     framework/source/accelerators/acceleratorconfiguration \
@@ -150,7 +156,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\
     framework/source/recording/dispatchrecorder \
     framework/source/recording/dispatchrecordersupplier \
     framework/source/services/ContextChangeEventMultiplexer \
-    framework/source/services/autorecovery \
     framework/source/services/desktop \
     framework/source/services/dispatchhelper \
     framework/source/services/frame \
diff --git a/framework/util/autorecovery.component b/framework/util/autorecovery.component
new file mode 100644
index 000000000000..d3e457cb1ce0
--- /dev/null
+++ b/framework/util/autorecovery.component
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.framework.AutoRecovery"
+      constructor="com_sun_star_comp_framework_AutoRecovery_get_implementation"
+      single-instance="true">
+    <service name="com.sun.star.frame.AutoRecovery"/>
+    <singleton name="com.sun.star.frame.theAutoRecovery"/>
+  </implementation>
+</component>
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 2b9eb7807fee..019549f29de7 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -27,12 +27,6 @@
       constructor="com_sun_star_comp_framework_AddonsToolBarFactory_get_implementation">
     <service name="com.sun.star.ui.ToolBarFactory"/>
   </implementation>
-  <implementation name="com.sun.star.comp.framework.AutoRecovery"
-      constructor="com_sun_star_comp_framework_AutoRecovery_get_implementation"
-      single-instance="true">
-    <service name="com.sun.star.frame.AutoRecovery"/>
-    <singleton name="com.sun.star.frame.theAutoRecovery"/>
-  </implementation>
   <implementation name="com.sun.star.comp.framework.ControlMenuController"
       constructor="com_sun_star_comp_framework_ControlMenuController_get_implementation">
     <service name="com.sun.star.frame.PopupMenuController"/>
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index a449be4d17fe..71f371a7eddc 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -16,6 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
+
 #include <config_locales.h>
 
 #include <breakiteratorImpl.hxx>
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 8b1a81413d01..8a79e5a7040a 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -11,6 +11,8 @@
 #define INCLUDED_VCL_BITMAP_TOOLS_HXX
 
 #include <config_cairo_canvas.h>
+#include <config_wasm_strip.h>
+
 #include <vcl/bitmapex.hxx>
 #include <vcl/ImageTree.hxx>
 #if ENABLE_CAIRO_CANVAS
@@ -26,10 +28,12 @@ namespace com::sun::star::geometry { struct IntegerRectangle2D; }
 
 namespace vcl::bitmap {
 
+#ifndef ENABLE_WASM_STRIP_PREMULTIPLY
 typedef std::array<std::array<sal_uInt8, 256>, 256> lookup_table;
 
 VCL_DLLPUBLIC lookup_table const & get_premultiply_table();
 VCL_DLLPUBLIC lookup_table const & get_unpremultiply_table();
+#endif
 
 sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a);
 sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a);
diff --git a/lingucomponent/Library_guesslang.mk b/lingucomponent/Library_guesslang.mk
index 55f9225722a5..3363e6aa1831 100644
--- a/lingucomponent/Library_guesslang.mk
+++ b/lingucomponent/Library_guesslang.mk
@@ -12,10 +12,15 @@ $(eval $(call gb_Library_Library,guesslang))
 
 $(eval $(call gb_Library_set_componentfile,guesslang,lingucomponent/source/languageguessing/guesslang))
 
+ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE)
 $(eval $(call gb_Library_use_externals,guesslang,\
-	boost_headers \
 	libexttextcat \
 ))
+endif
+
+$(eval $(call gb_Library_use_externals,guesslang,\
+	boost_headers \
+))
 
 $(eval $(call gb_Library_use_sdk_api,guesslang))
 
diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk
index 2bde5d5391e5..9f19dcedbc67 100644
--- a/lingucomponent/Module_lingucomponent.mk
+++ b/lingucomponent/Module_lingucomponent.mk
@@ -10,13 +10,23 @@
 
 $(eval $(call gb_Module_Module,lingucomponent))
 
+ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE)
 $(eval $(call gb_Module_add_targets,lingucomponent,\
 	Library_guesslang \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Module_add_targets,lingucomponent,\
 	Library_hyphen \
 	Library_lnth \
-	$(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
 	Library_spell \
 	StaticLibrary_ulingu \
+))
+endif
+
+$(eval $(call gb_Module_add_targets,lingucomponent,\
+	$(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
 	Library_numbertext \
 ))
 
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 287a4bb70003..4473423d0dd8 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -83,28 +83,10 @@ endif
 
 $(eval $(call gb_Library_set_componentfile,oox,oox/util/oox))
 
+# WASM_CHART change
+ifeq (,$(ENABLE_WASM_STRIP_CHART))
 $(eval $(call gb_Library_add_exception_objects,oox,\
-    oox/source/core/binarycodec \
-    oox/source/core/contexthandler2 \
-    oox/source/core/contexthandler \
-    oox/source/core/fastparser \
-    oox/source/core/fasttokenhandler \
-    oox/source/core/filterbase \
-    oox/source/core/filterdetect \
-    oox/source/core/fragmenthandler2 \
-    oox/source/core/fragmenthandler \
-    oox/source/core/recordparser \
-    oox/source/core/relations \
-    oox/source/core/relationshandler \
-    oox/source/core/xmlfilterbase \
-    oox/source/crypto/AgileEngine \
-    oox/source/crypto/CryptTools \
-    oox/source/crypto/DocumentEncryption \
-    oox/source/crypto/DocumentDecryption \
-    oox/source/crypto/Standard2007Engine \
-    oox/source/crypto/StrongEncryptionDataSpace \
-    oox/source/docprop/docprophandler \
-    oox/source/docprop/ooxmldocpropimport \
+    oox/source/export/chartexport \
     oox/source/drawingml/chart/axiscontext \
     oox/source/drawingml/chart/axisconverter \
     oox/source/drawingml/chart/axismodel \
@@ -132,6 +114,31 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
     oox/source/drawingml/chart/typegroupcontext \
     oox/source/drawingml/chart/typegroupconverter \
     oox/source/drawingml/chart/typegroupmodel \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,oox,\
+    oox/source/core/binarycodec \
+    oox/source/core/contexthandler2 \
+    oox/source/core/contexthandler \
+    oox/source/core/fastparser \
+    oox/source/core/fasttokenhandler \
+    oox/source/core/filterbase \
+    oox/source/core/filterdetect \
+    oox/source/core/fragmenthandler2 \
+    oox/source/core/fragmenthandler \
+    oox/source/core/recordparser \
+    oox/source/core/relations \
+    oox/source/core/relationshandler \
+    oox/source/core/xmlfilterbase \
+    oox/source/crypto/AgileEngine \
+    oox/source/crypto/CryptTools \
+    oox/source/crypto/DocumentEncryption \
+    oox/source/crypto/DocumentDecryption \
+    oox/source/crypto/Standard2007Engine \
+    oox/source/crypto/StrongEncryptionDataSpace \
+    oox/source/docprop/docprophandler \
+    oox/source/docprop/ooxmldocpropimport \
     oox/source/drawingml/clrschemecontext \
     oox/source/drawingml/clrscheme \
     oox/source/drawingml/colorchoicecontext \
@@ -214,7 +221,6 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
     oox/source/dump/dumperbase \
     oox/source/dump/oledumper \
     oox/source/dump/pptxdumper \
-    oox/source/export/chartexport \
     oox/source/export/ColorPropertySet \
     oox/source/export/drawingml \
     oox/source/export/shapes \
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b0e2ddef30e7..9c773441e6ee 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_wasm_strip.h>
+
 #include <oox/drawingml/shape.hxx>
 #include <drawingml/customshapeproperties.hxx>
 #include <oox/drawingml/theme.hxx>
@@ -1905,6 +1907,15 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
                 Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW );
 
                 // load the chart data from the XML fragment
+#ifdef ENABLE_WASM_STRIP_CHART
+                (void) rFilter;
+                (void) rxShapes;
+#else
+                // WASM_CHART change
+                // TODO: Instead of using convertFromModel an alternative may be
+                // added to convert not to Chart/OLE SdrObejct, but to GraphicObject
+                // with the Chart visualization. There should be a preiew available
+                // in the imported chart data
                 bool bMSO2007Doc = rFilter.isMSO2007Document();
                 chart::ChartSpaceModel aModel(bMSO2007Doc);
                 rtl::Reference<chart::ChartSpaceFragment> pChartSpaceFragment = new chart::ChartSpaceFragment(
@@ -1945,6 +1956,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >&
                     }
 
                 }
+#endif
             }
             catch( Exception& )
             {
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 323b0ebcc2f5..3968f23853b6 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -17,9 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <sal/config.h>
+#include <config_wasm_strip.h>
 
+#include <sal/config.h>
 #include <sal/log.hxx>
+
 #include <filter/msfilter/util.hxx>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/export/shapes.hxx>
@@ -2005,9 +2007,14 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
         xPropSet->getPropertyValue("Model") >>= xChartDoc;
         assert(xChartDoc.is());
         //export the chart
+#ifndef ENABLE_WASM_STRIP_CHART
+        // WASM_CHART change
+        // TODO: With Chart extracted this cannot really happen since
+        // no Chart could've been added at all
         ChartExport aChartExport( mnXmlNamespace, GetFS(), xChartDoc, GetFB(), GetDocumentType() );
         static sal_Int32 nChartCount = 0;
         aChartExport.WriteChartObj( xShape, GetNewShapeID( xShape ), ++nChartCount );
+#endif
         return *this;
     }
 
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 1f569d099876..9a30913c3dac 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_wasm_strip.h>
+
 #include <sal/config.h>
 #include <sal/log.hxx>
 
@@ -60,8 +62,12 @@ XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr;
 
 PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) :
     XmlFilterBase( rxContext ),
+#ifdef ENABLE_WASM_STRIP_CHART
+    // WASM_CHART change
+    mxChartConv( )
+#else
     mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
-
+#endif
 {
 #if OSL_DEBUG_LEVEL > 0
     mpDebugFilterBase = this;
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
index f5bb1af03955..486e844a3542 100644
--- a/oox/source/shape/ShapeFilterBase.cxx
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_wasm_strip.h>
+
 #include <oox/shape/ShapeFilterBase.hxx>
 #include <oox/drawingml/chart/chartconverter.hxx>
 #include <oox/drawingml/themefragmenthandler.hxx>
@@ -34,7 +36,12 @@ using namespace ::com::sun::star;
 
 ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) :
     XmlFilterBase( rxContext ),
+#ifdef ENABLE_WASM_STRIP_CHART
+    // WASM_CHART change
+    mxChartConv( )
+#else
     mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() )
+#endif
 {
 }
 
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 82110c712127..a5843e6becab 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -15,9 +15,8 @@ ifeq (,$(ENABLE_SERVICES_RDB_FROM_BUILD))
 #
 # "minimal" list of services for cross-compiling build tools
 #
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
 $(eval $(call gb_Rdb_add_components,services,\
-	$(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \
-	$(call gb_Helper_optional,SCRIPTING,basic/util/sb) \
 	canvas/source/factory/canvasfactory \
 	canvas/source/simplecanvas/simplecanvas \
 	canvas/source/vcl/vclcanvas \
@@ -27,13 +26,19 @@ $(eval $(call gb_Rdb_add_components,services,\
 		canvas/source/directx/directx9canvas \
 		canvas/source/directx/gdipluscanvas \
 	) \
+	cppcanvas/source/uno/mtfrenderer \
+))
+endif
+
+$(eval $(call gb_Rdb_add_components,services,\
+	$(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \
+	$(call gb_Helper_optional,SCRIPTING,basic/util/sb) \
 	comphelper/util/comphelp \
 	configmgr/source/configmgr \
 	$(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)), \
 		connectivity/source/dbtools/dbtools \
 		connectivity/source/drivers/dbase/dbase \
 	) \
-	cppcanvas/source/uno/mtfrenderer \
 	drawinglayer/drawinglayer \
 	emfio/emfio \
 	filter/source/config/cache/filterconfig1 \
@@ -72,10 +77,45 @@ $(eval $(call gb_Rdb_add_components,services,\
 
 ifeq ($(gb_Side),host)
 
+# WASM_CHART change
+ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
 $(eval $(call gb_Rdb_add_components,services,\
-	animations/source/animcore/animcore \
 	chart2/source/controller/chartcontroller \
 	chart2/source/chartcore \
+	writerperfect/source/calc/wpftcalc \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+	desktop/source/deployment/deployment.extended \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+	$(if $(filter WNT,$(OS)), \
+		winaccessibility/source/service/winaccessibility \
+	) \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+	lingucomponent/source/languageguessing/guesslang \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+	lingucomponent/source/hyphenator/hyphen/hyphen \
+	lingucomponent/source/thesaurus/libnth/lnth \
+	lingucomponent/source/spellcheck/spell/spell \
+))
+endif
+
+$(eval $(call gb_Rdb_add_components,services,\
+	animations/source/animcore/animcore \
 	cui/util/cui \
 	desktop/source/deployment/deployment \
 	embeddedobj/util/embobj \
@@ -94,10 +134,6 @@ $(eval $(call gb_Rdb_add_components,services,\
 	$(call gb_Helper_optional,DESKTOP,fpicker/source/office/fps_office) \
 	$(if $(filter MACOSX,$(OS)),fpicker/source/aqua/fps_aqua) \
 	hwpfilter/source/hwp \
-	lingucomponent/source/hyphenator/hyphen/hyphen \
-	lingucomponent/source/languageguessing/guesslang \
-	lingucomponent/source/spellcheck/spell/spell \
-	lingucomponent/source/thesaurus/libnth/lnth \
 	lingucomponent/source/numbertext/numbertext \
 	linguistic/source/lng \
 	$(if $(ENABLE_LWP), \
@@ -156,7 +192,6 @@ $(eval $(call gb_Rdb_add_components,services,\
 	writerperfect/source/draw/wpftdraw \
 	writerperfect/source/impress/wpftimpress \
 	writerperfect/source/writer/wpftwriter \
-	writerperfect/source/calc/wpftcalc \
 	$(if $(filter MACOSX,$(OS)), \
 		$(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \
 		shell/source/backends/macbe/macbe1 \
@@ -173,7 +208,6 @@ $(eval $(call gb_Rdb_add_components,services,\
 		shell/source/backends/wininetbe/wininetbe1 \
 		shell/source/win32/simplemail/smplmail \
 		shell/source/win32/syssh \
-		winaccessibility/source/service/winaccessibility \
 	) \
 	$(if $(filter-out WNT,$(OS)), \
 		embeddedobj/source/msole/emboleobj \
@@ -232,13 +266,26 @@ $(eval $(call gb_Rdb_add_components,services,\
     $(call gb_Helper_optional,XMLHELP,xmlhelp/util/ucpchelp1) \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
 $(eval $(call gb_Rdb_add_components,services,\
-	extensions/source/bibliography/bib \
 	dbaccess/util/dba \
 ))
+endif
+
+$(eval $(call gb_Rdb_add_components,services,\
+	extensions/source/bibliography/bib \
+))
 
 ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
 
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
+$(eval $(call gb_Rdb_add_components,services,\
+	dbaccess/source/filter/xml/dbaxml \
+	dbaccess/util/dbu \
+	dbaccess/util/sdbt \
+))
+endif
+
 $(eval $(call gb_Rdb_add_components,services,\
 	extensions/source/dbpilots/dbp \
 	extensions/source/propctrlr/pcr \
@@ -267,9 +314,6 @@ $(eval $(call gb_Rdb_add_components,services,\
 	connectivity/source/drivers/mysql_jdbc/mysql_jdbc \
 	connectivity/source/manager/sdbc2 \
 	connectivity/source/drivers/writer/writer \
-	dbaccess/source/filter/xml/dbaxml \
-	dbaccess/util/dbu \
-	dbaccess/util/sdbt \
 	forms/util/frm \
 	reportdesign/util/rpt \
 	reportdesign/util/rptui \
@@ -295,7 +339,7 @@ $(eval $(call gb_Rdb_add_components,services,\
 	desktop/source/migration/services/migrationoo2 \
 	desktop/source/migration/services/migrationoo3 \
 	desktop/source/offacc/offacc \
-	$(if $(DISABLE_GUI),,desktop/source/splash/spl) \
+	$(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,desktop/source/splash/spl) \
 	$(if $(DISABLE_DYNLOADING),,extensions/source/abpilot/abp) \
 	$(if $(ENABLE_LDAP),extensions/source/config/ldap/ldapbe2) \
 	$(if $(filter WNT,$(OS)),\
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 647f975e1f16..6dd18c73ae71 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -127,6 +127,23 @@ endif
 
 $(eval $(call gb_Library_set_componentfile,sd,sd/util/sd))
 
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Library_add_exception_objects,sd,\
+	sd/source/ui/accessibility/AccessibleDocumentViewBase \
+	sd/source/ui/accessibility/AccessibleDrawDocumentView \
+	sd/source/ui/accessibility/AccessibleOutlineEditSource \
+	sd/source/ui/accessibility/AccessibleOutlineView \
+	sd/source/ui/accessibility/AccessiblePageShape \
+	sd/source/ui/accessibility/AccessiblePresentationGraphicShape \
+	sd/source/ui/accessibility/AccessiblePresentationOLEShape \
+	sd/source/ui/accessibility/AccessiblePresentationShape \
+	sd/source/ui/accessibility/AccessibleSlideSorterObject \
+	sd/source/ui/accessibility/AccessibleSlideSorterView \
+	sd/source/ui/accessibility/AccessibleViewForwarder \
+	sd/source/ui/accessibility/SdShapeTypes \
+))
+endif
+
 $(eval $(call gb_Library_add_exception_objects,sd,\
 	sd/source/core/CustomAnimationCloner \
 	sd/source/core/CustomAnimationEffect \
@@ -170,18 +187,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
 	sd/source/filter/xml/sdtransform \
 	sd/source/filter/xml/sdxmlwrp \
 	sd/source/helper/simplereferencecomponent \
-	sd/source/ui/accessibility/AccessibleDocumentViewBase \
-	sd/source/ui/accessibility/AccessibleDrawDocumentView \
-	sd/source/ui/accessibility/AccessibleOutlineEditSource \
-	sd/source/ui/accessibility/AccessibleOutlineView \
-	sd/source/ui/accessibility/AccessiblePageShape \
-	sd/source/ui/accessibility/AccessiblePresentationGraphicShape \
-	sd/source/ui/accessibility/AccessiblePresentationOLEShape \
-	sd/source/ui/accessibility/AccessiblePresentationShape \
-	sd/source/ui/accessibility/AccessibleSlideSorterObject \
-	sd/source/ui/accessibility/AccessibleSlideSorterView \
-	sd/source/ui/accessibility/AccessibleViewForwarder \
-	sd/source/ui/accessibility/SdShapeTypes \
 	sd/source/ui/animations/CustomAnimationDialog \
 	sd/source/ui/animations/CustomAnimationList \
 	sd/source/ui/animations/CustomAnimationPane \
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 0120cee75b4e..207c81897332 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))
 
+ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE)
+$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx.extended))
+endif
+
 $(eval $(call gb_Library_set_precompiled_header,sfx,sfx2/inc/pch/precompiled_sfx))
 
 $(eval $(call gb_Library_use_custom_headers,sfx,\
@@ -80,9 +84,23 @@ $(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
+
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
 $(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/accessibility/AccessibilityCheck \
     sfx2/source/accessibility/AccessibilityIssue \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,sfx,\
     sfx2/source/appl/app \
     sfx2/source/appl/appbas \
     sfx2/source/appl/appbaslib \
@@ -145,8 +163,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 \
@@ -174,8 +190,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 \
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 098f705410a4..5578d3021160 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -18,6 +18,8 @@
  */
 
 #include <config_features.h>
+#include <config_wasm_strip.h>
+
 #include <com/sun/star/drawing/ModuleDispatcher.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/DispatchResultEvent.hpp>
@@ -505,6 +507,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             sfx2::openUriExternally(sURL, false);
             break;
         }
+#ifndef ENABLE_WASM_STRIP_PINGUSER
         case SID_GETINVOLVED:
         {
             // Open get involved/join us page based on locales
@@ -532,6 +535,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             sfx2::openUriExternally(sURL, false);
             break;
         }
+#endif
         case SID_SHOW_LICENSE:
         {
             LicenseDialog aDialog(rReq.GetFrameWeld());
@@ -607,6 +611,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             break;
         }
         // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+#ifndef ENABLE_WASM_STRIP_PINGUSER
         case SID_TIPOFTHEDAY:
         {
             SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -615,6 +620,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             bDone = true;
             break;
         }
+#endif
 
         // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         case SID_ABOUT:
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b7fa742cabe8..8cb07151874a 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -18,6 +18,8 @@
  */
 
 #include <config_feature_desktop.h>
+#include <config_wasm_strip.h>
+
 #include <osl/file.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/infobar.hxx>
@@ -1360,8 +1362,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                 rBind.Invalidate( SID_RELOAD );
                 rBind.Invalidate( SID_EDITDOC );
 
+#ifndef ENABLE_WASM_STRIP_PINGUSER
                 const auto t0 = std::chrono::system_clock::now().time_since_epoch();
-
                 bool bIsUITest = false; //uitest.uicheck fails when the dialog is open
                 for( sal_uInt16 i = 0; i < Application::GetCommandLineParamCount(); i++ )
                 {
@@ -1449,6 +1451,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                     officecfg::Setup::Product::LastTimeDonateShown::set(nNow, batch);
                     batch->commit();
                 }
+#endif
 
                 // read-only infobar if necessary
                 const SfxViewShell *pVSh;
@@ -1592,6 +1595,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
     }
 }
 
+#ifndef ENABLE_WASM_STRIP_PINGUSER
 IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, weld::Button&, void)
 {
     GetDispatcher()->Execute(SID_WHATSNEW);
@@ -1606,6 +1610,7 @@ IMPL_LINK_NOARG(SfxViewFrame, DonationHandler, weld::Button&, void)
 {
     GetDispatcher()->Execute(SID_DONATION);
 }
+#endif
 
 IMPL_LINK(SfxViewFrame, SwitchReadOnlyHandler, weld::Button&, rButton, void)
 {
diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component
index a7c9930e0ec8..af29af66defd 100644
--- a/sfx2/util/sfx.component
+++ b/sfx2/util/sfx.component
@@ -19,11 +19,6 @@
 
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.sfx2.BackingComp"
-      constructor="com_sun_star_comp_sfx2_BackingComp_get_implementation">
-    <service name="com.sun.star.frame.StartModule"/>
-    <service name="com.sun.star.frame.ProtocolHandler"/>
-  </implementation>
   <implementation name="SfxDocumentMetaData"
       constructor="SfxDocumentMetaData_get_implementation">
     <service name="com.sun.star.document.DocumentProperties"/>
diff --git a/sfx2/util/sfx.extended.component b/sfx2/util/sfx.extended.component
new file mode 100644
index 000000000000..f501c997cba5
--- /dev/null
+++ b/sfx2/util/sfx.extended.component
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+    xmlns="http://openoffice.org/2010/uno-components">
+  <implementation name="com.sun.star.comp.sfx2.BackingComp"
+      constructor="com_sun_star_comp_sfx2_BackingComp_get_implementation">
+    <service name="com.sun.star.frame.StartModule"/>
+    <service name="com.sun.star.frame.ProtocolHandler"/>
+  </implementation>
+</component>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 9831e691a075..867c33b99b31 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -35,62 +35,62 @@ core_constructor_list = [
     "stardiv_UnoControls_ProgressMonitor_get_implementation",
     "stardiv_UnoControls_StatusIndicator_get_implementation",
 # canvas/source/factory/canvasfactory.component
-    "com_sun_star_comp_rendering_CanvasFactory_get_implementation",
+    ("com_sun_star_comp_rendering_CanvasFactory_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"),
 # canvas/source/vcl/vclcanvas.component
-    "com_sun_star_comp_rendering_Canvas_VCL_get_implementation",
-    "com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation",
+    ("com_sun_star_comp_rendering_Canvas_VCL_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"),
+    ("com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"),
 # chart2/source/chartcore.component
-    "com_sun_star_chart2_ExponentialScaling_get_implementation",
-    "com_sun_star_chart2_LinearScaling_get_implementation",
-    "com_sun_star_chart2_LogarithmicScaling_get_implementation",
-    "com_sun_star_chart2_PowerScaling_get_implementation",
-    "com_sun_star_comp_chart_AreaChartType_get_implementation",
-    "com_sun_star_comp_chart_BarChartType_get_implementation",
-    "com_sun_star_comp_chart_BubbleChartType_get_implementation",
-    "com_sun_star_comp_chart_CachedDataSequence_get_implementation",
-    "com_sun_star_comp_chart_CandleStickChartType_get_implementation",
-    "com_sun_star_comp_chart_ChartTypeManager_get_implementation",
-    "com_sun_star_comp_chart_ColumnChartType_get_implementation",
-    "com_sun_star_comp_chart_DataSeries_get_implementation",
-    "com_sun_star_comp_chart_DataSource_get_implementation",
-    "com_sun_star_comp_chart_FilledNetChartType_get_implementation",
-    "com_sun_star_comp_chart_FormattedString_get_implementation",
-    "com_sun_star_comp_chart_InternalDataProvider_get_implementation",
-    "com_sun_star_comp_chart_LineChartType_get_implementation",
-    "com_sun_star_comp_chart_NetChartType_get_implementation",
-    "com_sun_star_comp_chart_PieChartType_get_implementation",
-    "com_sun_star_comp_chart_ScatterChartType_get_implementation",
-    "com_sun_star_comp_chart2_Axis_get_implementation",
-    "com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation",
-    "com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation",
-    "com_sun_star_comp_chart2_ChartController_get_implementation",
-    "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation",
-    "com_sun_star_comp_chart2_ChartModel_get_implementation",
-    "com_sun_star_comp_chart2_ChartView_get_implementation",
-    "com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation",
-    "com_sun_star_comp_chart2_Diagram_get_implementation",
-    "com_sun_star_comp_chart2_ErrorBar_get_implementation",
-    "com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_GridProperties_get_implementation",
-    "com_sun_star_comp_chart2_LabeledDataSequence_get_implementation",
-    "com_sun_star_comp_chart2_Legend_get_implementation",
-    "com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_PageBackground_get_implementation",
-    "com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation",
-    "com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation",
-    "com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation",
-    "com_sun_star_comp_chart2_RegressionEquation_get_implementation",
-    "com_sun_star_comp_chart2_Title_get_implementation",
-    "com_sun_star_comp_chart2_XMLFilter_get_implementation",
+    ("com_sun_star_chart2_ExponentialScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_chart2_LinearScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_chart2_LogarithmicScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_chart2_PowerScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_AreaChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_BarChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_BubbleChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_CachedDataSequence_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_CandleStickChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_ChartTypeManager_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_ColumnChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_DataSeries_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_DataSource_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_FilledNetChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_FormattedString_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_InternalDataProvider_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_LineChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_NetChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_PieChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),
+    ("com_sun_star_comp_chart_ScatterChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"),

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list