summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/wasm
Commit message (Collapse)AuthorAgeFilesLines
* wasm: Boost emscripten 1.39.8 as recommendedLorn Potter2020-03-231-1/+1
| | | | | | | [ChangeLog][WebAssembly] Updated emscripten to version 1.39.8 Change-Id: I8d19f851eb0c0dd912792cee0db69e61cf4fd5f6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-181-1/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlinkedlist.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
| * wasm: remove dependency on perl to find emscripten versionLorn Potter2020-02-171-1/+3
| | | | | | | | | | | | Change-Id: I0d5224d497b2b5652d1be036f2a90c6c53f0c9df Fixes: QTBUG-81722 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | wasm: fix loading of default_pre.prfLorn Potter2020-02-151-1/+1
|/ | | | | | | | This fixes windows build and detection of c++ version Task-number: QTBUG-80610 Change-Id: I5196e83f9aad6663aea47c31ae4a2da4c4d74e94 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* wasm: do not use clamp mode for upstream LLVMLorn Potter2019-12-162-24/+24
| | | | | | | | | | Emscripten version 1.39.0 and above are based upon upstream LLVM, which does not contain BINARYEN_TRAP_MODE Fixes: QTBUG-80691 Change-Id: I6129f84a31a607c202e13847b50705ef1c809630 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: enforce emscripten versionLorn Potter2019-12-112-0/+30
| | | | | | | | | | | | This creates a define in the binary, as well as writing emscripten version for qmake. It also enforces app builder to use a certain known version. Task-number: QTBUG-77745 Change-Id: I37691512171635cec66aa3ffa16258081f3f1e1b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* WebAssembly: Do not use sed directly for wasm_shell.html deploymentJoerg Bornemann2019-12-091-1/+1
| | | | | | | | | Use $$QMAKE_STREAM_EDITOR, instead, which will on Windows expand to "qmake -install sed" (triggering qmake's own sed implementation) and otherwise expand to "sed". Change-Id: I57da5fb3a4f6e5a09ae25c947caa0a10d279b480 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* wasm: allow setting total memory for non thread buildsLorn Potter2019-08-221-10/+14
| | | | | | | | Using WASM_OBJECT_FILES does not allow memory growth, so we need to just explicitly check for QMAKE_WASM_TOTAL_MEMORY Change-Id: I447113972dfc3df4ee4073e8cc25481646d1507b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* WASM: Make wasm_shell.html compatible with CMake configure_fileFredrik Orderud2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The CMake configure_file command is commonly used copy & modify template files during the build process. One limitation, thought, is that configure_file expect the variables to be replaced to be encoded using either a @APPNAME@ or ${APPNAME} convention. This commit therefore changes "APPNAME" to "@APPNAME@" in wasm_shell.html to make the HTML template file compatible with CMake configure_file. With this commit, it becomes possible to write the following CMake function that mimics what QMake is already doing: function(copy_html_js_launch_files target) set(APPNAME ${target}) configure_file("${_qt5Core_install_prefix}/plugins/platforms/wasm_shell.html" "${target}.html") configure_file("${_qt5Core_install_prefix}/plugins/platforms/qtloader.js" qtloader.js COPYONLY) endfunction() Change-Id: Ic38abdc498ba03b8d21f1b9b70aa1d480ae7f362 Reference: https://cmake.org/cmake/help/latest/command/configure_file.html Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Wasm: enable thread supportMorten Johan Sørvig2019-02-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Wasm: enable source map support for debug buildsMorten Johan Sørvig2019-02-071-0/+7
| | | | | | | | | | The source map location can be configured by setting QMAKE_WASM_SOURCE_MAP_BASE in the .pro file. Fall back to “http://localhost:8000” if not set. Task-number: QTBUG-72002 Change-Id: I9da80dacdefc272f267e5db4caac274d93ba4479 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* WebAssembly: Fix compilation of application on Windows hostEskil Abrahamsen Blomfeldt2018-12-031-2/+2
| | | | | | | | | | | When running configure on a Windows host, it would fail with the error that the copy statement was invalid, due to the forward slashes. This makes configure finish without errors. Task-number: QTBUG-72000 Change-Id: Id315d7436bbbfd2cd5c5f2dfcfe0c3dc3b9e34c2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix qpa plugin build system integrationOswald Buddenhagen2018-11-211-12/+0
| | | | | | | | | | | fix the plugin name (it was missing the leading 'q') and the name used in configure (the latter making it unnecessary to mess with it in the mkspec). the qt.prf override which forced linkage of the plugin is also removed due to being completely redundant. Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* WebAssembly for QtBaseMorten Johan Sørvig2018-08-302-0/+93
This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>