From de4f256d48145778ed56389f5e883c5994b34dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 20 Mar 2018 13:30:53 +0100 Subject: Wasm: enable thread support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- configure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.json') diff --git a/configure.json b/configure.json index 4a9e1fc24e..f7449ec068 100644 --- a/configure.json +++ b/configure.json @@ -1199,7 +1199,7 @@ "label": "Thread support", "purpose": "Provides QThread and related classes.", "section": "Kernel", - "condition": "!config.wasm", + "autoDetect": "!config.wasm", "output": [ "publicFeature" ] }, "future": { -- cgit v1.2.3