desktop/Executable_soffice_bin.mk              |    8 ++++++++
 desktop/Library_sofficeapp.mk                  |    9 +--------
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |    2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit ce60a3dd4dbff0dcb5b82c9053ae5d90f8ac929d
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Wed Apr 27 15:36:25 2022 +0000
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Nov 30 23:57:54 2022 +0100

    Add LOKit functions and whitelist export for it to WASM
    
    For calling into LOWA from native JS, make lokit functions available
    
    Change-Id: I6458806f33131e48692f35f2a2438b35efb1f06c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143497
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index a3c3ff258613..ce908c1be318 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -47,4 +47,12 @@ endif
 
 endif
 
+ifeq ($(OS),EMSCRIPTEN)
+
+$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
+       -s 
EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"]
 \
+))
+
+endif
+
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 70f4b07ea045..c315a113ca89 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -137,20 +137,13 @@ $(eval $(call 
gb_Library_add_exception_objects,sofficeapp,\
                desktop/source/lib/lokandroid) \
 ))
 else
-ifeq ($(USING_X11),TRUE)
+ifneq ($(filter TRUE,$(USING_X11) $(DISABLE_GUI))($filter EMSCRIPTEN,$(OS)),)
 $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
        desktop/source/lib/init \
        desktop/source/lib/lokinteractionhandler \
        desktop/source/lib/lokclipboard \
 ))
 endif
-ifeq ($(DISABLE_GUI),TRUE)
-$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
-    desktop/source/lib/init \
-    desktop/source/lib/lokinteractionhandler \
-    desktop/source/lib/lokclipboard \
-))
-endif
 endif
 
 # vim: set ts=4 sw=4 et:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 35a136b2f38d..b0629894a07e 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -27,7 +27,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s 
PTHREAD_POOL_SIZE=4
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","printErr"]
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap"]
 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

Reply via email to