From ef3813fc1eaeb739a43b00032f06a870ff22105a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Fri, 7 Oct 2022 12:00:22 +0200 Subject: 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 Reviewed-by: Alexandru Croitor --- cmake/QtWasmHelpers.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmake') 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() -- cgit v1.2.3