summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-08-12 13:04:48 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-08-12 16:31:35 +0200
commit6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4 (patch)
treeec859f580f04f3fed724c29d94f1405b8d980153 /desktop
parent221667db03fcefefc07525fb233316c14326901c (diff)
Emscripten: Move the Qt event loop off the JS main thread
...so that spawning and joining new threads works now and we no longer need a hardcoded -sPTHREAD_POOL_SIZE of pre-spawned threads (see b84ef4d67eaf9f9fd7fd700ca05339cb0cdff742 "Adapt comphelper::ThreadPool to Emscripten's threading needs"; lets keep MAX_CONCURRENCY capped at 4, at least for now, though). This requires <https://github.com/allotropia/qtbase/commit/167b08844df06e3cea85c98161b26e97442ab242> "Minimal support for Emscripten -sPROXY_TO_PTHREAD=1" and <https://github.com/allotropia/qtbase/commit/c722a25630a5390f18a4d974aa942f6376fcb8e1> "Implement QWasmCursor::changeCursor for Emscripten PROXY_TO_PTHREAD case" (see TODOs there). Change-Id: I8cea827bd7786e3c9fd9401b4b2bef9d3ec00d5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171758 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Executable_soffice_bin.mk1
1 files changed, 1 insertions, 0 deletions
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, \