summaryrefslogtreecommitdiffstats
path: root/mkspecs/wasm-emscripten
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-03-20 13:30:53 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-02-07 16:13:26 +0000
commitde4f256d48145778ed56389f5e883c5994b34dd2 (patch)
treeb60e8d154cf86e6077eedda79c96b3abecae9a2f /mkspecs/wasm-emscripten
parent6e7a7d5fb917b9099788a5917507dbfa56d5495c (diff)
Wasm: enable thread support
configure.json: Make the “thread” feature be allowed for wasm but disabled by default. Change qmake.conf and wasm.prf to enable Emscripten pthreads mode: - Add USE_PTHREADS=1 linker flag - Add PTHREAD_POOL_SIZE linker flag with a default pool size (4). - Add TOTAL_MEMORY linker flag to set available memory (1GB) It is possible to override options such as PTHREAD_POOL_SIZE from the application .pro file using QMAKE_WASM_PTHREAD_POOL_SIZE To change TOTAL_MEMORY, use QMAKE_WASM_TOTAL_MEMORY Make qtloader.js work in pthreads mode: - The Module.instantiateWasm callback must provide the module in addition to the instance to Emscripten. - Set Module.mainScriptUrlOrBlob so that the pthreads web workers can access the main script Task-number: QTBUG-64625 Change-Id: I1ab5a559ec97c27c5fc24500ba5f863bcd275141 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'mkspecs/wasm-emscripten')
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf1
1 files changed, 0 insertions, 1 deletions
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index e7b45d312d..6c4e62aff2 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -15,7 +15,6 @@ EMTERP_FLAGS = \
EMCC_COMMON_LFLAGS = \
-s WASM=1 \
-s FULL_ES2=1 \
- -s ALLOW_MEMORY_GROWTH=1 \
-s USE_WEBGL2=1 \
-s NO_EXIT_RUNTIME=0 \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \