diff options
author | Morten Sørvig <morten.sorvig@qt.io> | 2022-10-07 12:00:22 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2022-10-19 15:02:36 +0000 |
commit | ef3813fc1eaeb739a43b00032f06a870ff22105a (patch) | |
tree | 886c997ae26f820908dfbca59b7875238ae013c2 /cmake | |
parent | f5de333192ada282189713c43fff4a89a000273e (diff) |
wasm: add wasm_simd configure feature
Add Qt configure feature for enabling WebAssembly SIMD usage:
./configure ... -feature-wasm-simd128
Enabling this feature makes Qt add the -msimd128 flag to
the compile options, which enables SIMD instruction usage
for the compiler.
(This should not be confused with the previously added SSE
SIMD support, which uses Emscripten's support for translating
SSE SIMD to WASM SIMD)
Change-Id: I84a36ccef8abf9199c304d68ce371c6b1747b832
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtWasmHelpers.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake index 96d3edbeb3..20d4bc5c29 100644 --- a/cmake/QtWasmHelpers.cmake +++ b/cmake/QtWasmHelpers.cmake @@ -22,6 +22,9 @@ function (qt_internal_setup_wasm_target_properties wasmTarget) "SHELL:-s EXPORT_NAME=createQtAppInstance") #simd + if (QT_FEATURE_wasm_simd128) + target_compile_options("${wasmTarget}" INTERFACE -msimd128) + endif() if (QT_FEATURE_sse2) target_compile_options("${wasmTarget}" INTERFACE -O2 -msimd128 -msse -msse2) endif() |