PR #22745 opened by valadaptive URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22745 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22745.patch
When commit 2dc55f5993 added support for SIMD128, it *also* required users to pass `-msimd128` in --extra-cflags. This is a bit awkward and unintuitive. By changing this so that the requisite flags are added whenever the feature is enabled via the configure script, we make things more intuitive, and treat the configure script's `--disable-simd128` option as the "single source of truth". This technically affects compatibility since SIMD128 is now enabled by default for real, and WebAssembly does not have runtime feature detection. However, SIMD128 is widely supported (the last browser to support it was Safari 16.4, released March 2023). The ffmpegwasm project also [enables SIMD128 explicitly](https://github.com/ffmpegwasm/ffmpeg.wasm/blob/f876f90/Makefile#L9) already. I do later plan to add support for the relaxed SIMD extension. I'll make that one disabled-by-default (since Safari/JSC does not yet support it). This commit can be seen as preparatory work for that, since it's good to have a unified and simple way to manage WASM feature flags once we have multiple. >From ba6301a6aeb076b899fddac2d6900b90115c9fa9 Mon Sep 17 00:00:00 2001 From: valadaptive <[email protected]> Date: Tue, 7 Apr 2026 22:52:43 -0400 Subject: [PATCH] configure: set wasm SIMD128 cflags automatically When commit 2dc55f5993 added support for SIMD128, it *also* required users to pass `-msimd128` in --extra-cflags. This is a bit awkward and unintuitive. By changing this so that the requisite flags are added whenever the feature is enabled via the configure script, we make things a lot more intuitive. This technically affects compatibility since SIMD128 is enabled by default, and WebAssembly does not have runtime feature detection. However, SIMD128 is widely supported (the last browser to support it was Safari 16.4, released March 2023). The ffmpegwasm project also enables SIMD128 explicitly: https://github.com/ffmpegwasm/ffmpeg.wasm/blob/f876f90/Makefile#L9 I do later plan to add support for the relaxed SIMD extension. I'll make that one disabled-by-default (since Safari/JSC does not yet support it). Signed-off-by: valadaptive <[email protected]> --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index ff5f7935cd..b39c9d3187 100755 --- a/configure +++ b/configure @@ -6801,7 +6801,10 @@ elif enabled riscv; then elif enabled wasm; then - enabled simd128 && check_cc simd128 wasm_simd128.h "v128_t v = wasm_v128_load(0);" + if enabled simd128; then + check_cflags -msimd128 && + check_cc simd128 wasm_simd128.h "v128_t v = wasm_v128_load(0);" + fi elif enabled x86; then -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
