diff --git a/desktop/Executable_soffice_bin.mk b/desktop/Executable_soffice_bin.mk index 350e4a84a0b8..be3b303190c2 100644 --- a/desktop/Executable_soffice_bin.mk +++ b/desktop/Executable_soffice_bin.mk @@ -63,6 +63,7 @@ $(call gb_Executable_get_linktarget_target,soffice_bin): \ $(eval $(call gb_Executable_add_ldflags,soffice_bin,\ -s EXPORTED_FUNCTIONS=@$(gb_CustomTarget_workdir)/desktop/soffice_bin-emscripten-exports/exports -Wl$(COMMA)--whole-archive $(call gb_StaticLibrary_get_target,unoembind) -Wl$(COMMA)--no-whole-archive \ + -sPROXY_TO_PTHREAD=1 -sOFFSCREENCANVAS_SUPPORT=1 -sOFFSCREENCANVASES_TO_PTHREAD=\#qtcanvas \ )) ifeq ($(ENABLE_QT6),TRUE) $(eval $(call gb_Executable_add_ldflags,soffice_bin, \ diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 3898ead4448d..6ba9efe66a5c 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -15,7 +15,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 -D_LARGEFILE64_SOURCE -D_LA gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) # Initial memory size and worker thread pool -gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=6 +gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB # To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize # See emscripten.py, finalize_wasm, modify_wasm = True diff --git a/static/README.wasm.md b/static/README.wasm.md index de595b19b459..84635d09390d 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -64,11 +64,14 @@ With "-opensource -confirm-license" you agree to the open source license. git clone https://github.com/allotropia/qt5.git cd qt5 - git checkout v5.15.2+wasm + git checkout 5.15.2+wasm ./init-repository --module-subset=qtbase ./configure -opensource -confirm-license -xplatform wasm-emscripten -feature-thread -prefix QMAKE_CFLAGS+=-sSUPPORT_LONGJMP=wasm QMAKE_CXXFLAGS+=-sSUPPORT_LONGJMP=wasm make -j module-qtbase +Note that `5.15.2+wasm` is a branch that is expected to contain further fixes as they become +necessary. + Do not include `-fwasm-exceptions` in the above `QMAKE_CXXFLAGS`, see "Note: Currently, using the new Wasm exception handling and simulate_infinite_loop == true at the same time diff --git a/static/emscripten/environment.js b/static/emscripten/environment.js index 4e5d1f98c596..74536a665ccc 100644 --- a/static/emscripten/environment.js +++ b/static/emscripten/environment.js @@ -5,3 +5,4 @@ Module.preRun.push(function() { ENV.MAX_CONCURRENCY = '4'; ENV.SAL_LOG = "+WARN" }); +Module.ignoreApplicationExit = true;