Skip to content

Build fails for wasm32-wasi target: _Float16 is not supported on this target #1187

@UnitedMarsupials

Description

@UnitedMarsupials

Hello. As you may know, Mozilla bundles an older version of simde with their sources, and it works. I'm trying to use the latest version (0.8.2) installed by the FreeBSD port on my machine.

Unfortunately, compiling for the wasm32-wasi fails:

clang++18 --target=wasm32-wasi --sysroot=/opt/share/wasi-sysroot -o sse_optimized.wasm -c -I/n/home/ports/www/firefox/work/firefox-126.0.2/media/libsoundtouch/src -I/n/home/ports/www/firefox/work/.build/media/libsoundtouch/src -I/n/home/ports/www/firefox/work/.build/security/rlbox -I/n/home/ports/www/firefox/work/.build/dist/include -I/opt/include/nspr -I/opt/include -I/opt/include/nss -I/opt/include/nspr -I/n/home/ports/www/firefox/work/.build/dist/include/nss -I/opt/include -I/opt/include/libpng16 -I/opt/include/pixman-1 -Os -fno-exceptions -fno-strict-aliasing -DNDEBUG=1 -DTRIMMED=1 -DMOZ_IN_WASM_SANDBOX -DMOZ_SAMPLE_TYPE_FLOAT32=1 -DSOUNDTOUCH_ALLOW_SSE=1 -DSOUNDTOUCH_WASM_SIMD=1 -DSIMDE_ENABLE_NATIVE_ALIASES=1 -DBUILDING_SOUNDTOUCH=1 -DST_NO_EXCEPTION_HANDLING=1 -msimd128 -I/n/home/ports/www/firefox/work/.build/dist/stl_wrappers -MD -MP -MF .deps/sse_optimized.wasm.pp   /n/home/ports/www/firefox/work/firefox-126.0.2/media/libsoundtouch/src/sse_optimized.cpp
In file included from /n/home/ports/www/firefox/work/firefox-126.0.2/media/libsoundtouch/src/sse_optimized.cpp:65:
In file included from /opt/include/simde/x86/avx2.h:33:
In file included from /opt/include/simde/x86/avx.h:28:
In file included from /opt/include/simde/x86/sse.h:34:
/opt/include/simde/x86/../simde-f16.h:98:11: error: _Float16 is not supported on this target
   98 |   typedef _Float16 simde_float16;
      |           ^
1 error generated.

Is this a bug? Perhaps, I can set the SIMDE_FLOAT16_API to something as a work-around?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions