diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-12 13:04:48 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-12 16:31:35 +0200 |
commit | 6e6451ce96f47e0ef5e8ecf1750f394ff3fb48e4 (patch) | |
tree | ec859f580f04f3fed724c29d94f1405b8d980153 /static | |
parent | 221667db03fcefefc07525fb233316c14326901c (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 'static')
-rw-r--r-- | static/README.wasm.md | 5 | ||||
-rw-r--r-- | static/emscripten/environment.js | 1 |
2 files changed, 5 insertions, 1 deletions
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 <whatever> QMAKE_CFLAGS+=-sSUPPORT_LONGJMP=wasm QMAKE_CXXFLAGS+=-sSUPPORT_LONGJMP=wasm make -j<CORES> 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 <https://emscripten.org/docs/api_reference/emscripten.h.html#c.emscripten_set_main_loop> "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; |