diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2022-02-14 09:28:51 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2022-02-23 12:04:37 +1000 |
commit | af36dc7d763abcd4a5de28957f55cecd25cf8459 (patch) | |
tree | 0046162142d45fb5bc6fc73fe23a3060ef6658be /cmake | |
parent | 196e10bce4c0a9d7a746f5fdde47168a06823472 (diff) | |
download | qtbase-af36dc7d763abcd4a5de28957f55cecd25cf8459.tar.gz |
wasm: move user configurable settings
Both INITIAL_MEMORY and PTHREAD_POOL_SIZE are settings users can
change, they are not interface settings.
Fixes: QTBUG-100693
Pick-to: 6.3 6.2
Change-Id: Ie1547c7f52c9fe109a313260616705728024b6b8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtWasmHelpers.cmake | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake index a494725d7d..47af621861 100644 --- a/cmake/QtWasmHelpers.cmake +++ b/cmake/QtWasmHelpers.cmake @@ -22,23 +22,6 @@ function (qt_internal_setup_wasm_target_properties wasmTarget) target_compile_options("${wasmTarget}" INTERFACE -O2 -msimd128 -msse -msse2) endif() - # Hardcode wasm memory size. Emscripten does not currently support memory growth - # (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size - # at build time. Further, browsers limit the maximum initial memory size to 1GB. - # QT_WASM_INITIAL_MEMORY must be a multiple of 64KB (i.e. 65536) - if(NOT DEFINED QT_WASM_INITIAL_MEMORY) - if(QT_FEATURE_thread) - set(QT_WASM_INITIAL_MEMORY "1GB") - else() - set(QT_WASM_INITIAL_MEMORY "20MB") # emscripten default is 16MB, we need slightly more sometimes - endif() - endif() - - if(DEFINED QT_WASM_INITIAL_MEMORY) - target_link_options("${wasmTarget}" INTERFACE "SHELL:-s INITIAL_MEMORY=${QT_WASM_INITIAL_MEMORY}") - message("Setting INITIAL_MEMORY to ${QT_WASM_INITIAL_MEMORY}") - endif() - if (QT_FEATURE_opengles3) target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES3=1") @@ -58,14 +41,6 @@ function (qt_internal_setup_wasm_target_properties wasmTarget) if (QT_FEATURE_thread) target_compile_options("${wasmTarget}" INTERFACE "SHELL:-pthread") target_link_options("${wasmTarget}" INTERFACE "SHELL:-pthread") - - set(POOL_SIZE 4) - if(DEFINED QT_WASM_PTHREAD_POOL_SIZE) - set(POOL_SIZE ${QT_WASM_PTHREAD_POOL_SIZE}) - endif() - target_link_options("${wasmTarget}" INTERFACE "SHELL:-s PTHREAD_POOL_SIZE=${POOL_SIZE}") - message("Setting PTHREAD_POOL_SIZE to ${POOL_SIZE}") - else() target_link_options("${wasmTarget}" INTERFACE "SHELL:-s ALLOW_MEMORY_GROWTH=1") endif() |