emscripten
emscripten copied to clipboard
Missing SIMDe ARM NEON A32V8 native aliases
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.6 (1ddaae4d2d6dfbb678ecc193bc988820d1fc4633)
clang version 21.0.0git (https:/github.com/llvm/llvm-project 4775e6d9099467df9363e1a3cd5950cc3d2fde05)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /data/home/sliphua/open/emsdk/upstream/bin
Failing command line in full:
It fails when compiling astc-encoder ARM NEON version. I've found the cause so the build and adaption steps like adding the -msimd128 flag are omitted.
The error:
In file included from /data/home/sliphua/open/astc-encoder/Source/astcenc_mathlib.cpp:18:
In file included from /data/home/sliphua/open/astc-encoder/Source/astcenc_mathlib.h:460:
In file included from /data/home/sliphua/open/astc-encoder/Source/astcenc_vecmathlib.h:163:
/data/home/sliphua/open/astc-encoder/Source/astcenc_vecmathlib_neon_4.h:760:17: error: use of undeclared identifier 'vrndnq_f32'
760 | return vfloat4(vrndnq_f32(a.m));
| ^
1 error generated.
make[2]: *** [Source/CMakeFiles/astcenc-neon-static.dir/build.make:272: Source/CMakeFiles/astcenc-neon-static.dir/astcenc_mathlib.cpp.o] Error 1
The cause:
- emscripten uses SIMDe for NEON SIMD functions.
- SIMDe
vrndnq_f32requiresSIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES. https://github.com/simd-everywhere/simde/blob/2af3dce9b2481b6b32139b1022cdfc02a633c898/simde/arm/neon/rndn.h#L193-L196 - emscripten did not enabled
SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES. https://github.com/emscripten-core/emscripten/blob/d05dbc817acc5697854427407631e8cad277387d/tools/maint/simde_update.py#L75-L78
The error gone and the project can be compiled successfully if I manually define SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES.