From 97ee126d69859d01abfbdb55450d27afb71bf9b1 Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Mon, 8 Aug 2022 10:49:20 +0200 Subject: WASM add Calc as optional build result, make it build & run Adding new config option: --with-main-module= With this switcher we can build only WASM writer module or calc module. The default value is 'writer'. This commit also reverts: 26603bc9ef0116ed31c510dab82b69d3666447b5 (WASM fix orcus native exception handling (NEH)) Because Calc import is using liborcus for loading styles.xml. Change-Id: I4c330ef8eea7d08214bf357531ee0bf7383ab788 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137946 Reviewed-by: Thorsten Behrens Tested-by: Jenkins --- writerperfect/Library_wpftcalc.mk | 13 +++++++++++-- writerperfect/Module_writerperfect.mk | 8 ++++++-- writerperfect/source/calc/wpftcalc.component | 1 + writerperfect/source/calc/wpftcalc.component.extended | 7 +++++++ 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 writerperfect/source/calc/wpftcalc.component.extended (limited to 'writerperfect') diff --git a/writerperfect/Library_wpftcalc.mk b/writerperfect/Library_wpftcalc.mk index 1ff7398c54da..9f235603017f 100644 --- a/writerperfect/Library_wpftcalc.mk +++ b/writerperfect/Library_wpftcalc.mk @@ -26,6 +26,10 @@ $(eval $(call gb_Library_set_include,wpftcalc,\ $(eval $(call gb_Library_set_componentfile,wpftcalc,writerperfect/source/calc/wpftcalc,services)) +$(eval $(call gb_Library_add_componentimpls,wpftcalc, \ + $(if $(ENABLE_WASM_STRIP_SCEXPORTS),,extended) \ +)) + $(eval $(call gb_Library_use_sdk_api,wpftcalc)) $(eval $(call gb_Library_use_libraries,wpftcalc,\ @@ -46,7 +50,7 @@ $(eval $(call gb_Library_use_libraries,wpftcalc,\ $(eval $(call gb_Library_use_externals,wpftcalc,\ boost_headers \ - etonyek \ + $(if $(ENABLE_WASM_STRIP_SCEXPORTS),,etonyek) \ odfgen \ revenge \ mwaw \ @@ -60,10 +64,15 @@ $(eval $(call gb_Library_use_externals,wpftcalc,\ icuuc \ )) +ifneq ($(ENABLE_WASM_STRIP_SCEXPORTS),TRUE) +$(eval $(call gb_Library_add_exception_objects,wpftcalc,\ + writerperfect/source/calc/NumbersImportFilter \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,wpftcalc,\ writerperfect/source/calc/MSWorksCalcImportFilter \ writerperfect/source/calc/MWAWCalcImportFilter \ - writerperfect/source/calc/NumbersImportFilter \ writerperfect/source/calc/StarOfficeCalcImportFilter \ )) diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk index c09dc27b1bde..d7ea1b93903a 100644 --- a/writerperfect/Module_writerperfect.mk +++ b/writerperfect/Module_writerperfect.mk @@ -20,12 +20,16 @@ $(eval $(call gb_Module_Module,writerperfect)) $(eval $(call gb_Module_add_targets,writerperfect,\ - $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ - Library_wpftcalc \ + $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \ Library_wpftdraw \ Library_wpftimpress \ ) \ + $(if $(ENABLE_WASM_STRIP_CALC),, \ + Library_wpftcalc \ + ) \ + $(if $(ENABLE_WASM_STRIP_WRITER),, \ Library_wpftwriter \ + ) \ Library_writerperfect \ UIConfig_writerperfect \ )) diff --git a/writerperfect/source/calc/wpftcalc.component b/writerperfect/source/calc/wpftcalc.component index 404d09b6ca6a..7054f7699534 100644 --- a/writerperfect/source/calc/wpftcalc.component +++ b/writerperfect/source/calc/wpftcalc.component @@ -23,6 +23,7 @@ constructor="org_libreoffice_comp_Calc_NumbersImportFilter_get_implementation"> + diff --git a/writerperfect/source/calc/wpftcalc.component.extended b/writerperfect/source/calc/wpftcalc.component.extended new file mode 100644 index 000000000000..81bdc103cc95 --- /dev/null +++ b/writerperfect/source/calc/wpftcalc.component.extended @@ -0,0 +1,7 @@ +# 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/. + +org.libreoffice.comp.Calc.NumbersImportFilter -- cgit