path: root/mkspecs/features/qt.prf
diff options
authorMorten Johan Sørvig <>2018-03-20 13:30:53 +0100
committerMorten Johan Sørvig <>2019-02-07 16:13:26 +0000
commitde4f256d48145778ed56389f5e883c5994b34dd2 (patch)
treeb60e8d154cf86e6077eedda79c96b3abecae9a2f /mkspecs/features/qt.prf
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 <> Reviewed-by: Lorn Potter <>
Diffstat (limited to 'mkspecs/features/qt.prf')
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index d8d5acaafd..5ac640190a 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -2,7 +2,7 @@
# due to required Qt modules being missing.
-CONFIG *= thread
+qtConfig(thread): CONFIG *= thread
#handle defines
win32 {