Due to emscripten-core/emscripten#24076, we hit error like:
error: no matching function for call to '_mm256_loadu_si256'
137 | m = _mm256_loadu_si256(reinterpret_cast<const __m256i*>(p));
| ^~~~~~~~~~~~~~~~~~
Now this issue has been fixed upstream but we haven't updated emscripten yet resulting in the todo in gn/standalone/BUILD.gn
# TODO: Remove this after updating emscripten.
config("wasm_avx2") {
# Opt-in config for targets that use x86 AVX2 hand-rolled SIMD compiled for
# WASM. Apply explicitly via configs += ["//gn/standalone:wasm_avx2"]; do NOT
# add to default_configs — third-party code (e.g. Abseil CRC) uses AVX2
# intrinsics with types incompatible with Emscripten's strict AVX2 headers.
# See https://github.com/emscripten-core/emscripten/issues/24076.
if (is_wasm) {
cflags = [ "-mavx2" ]
}
}
Due to emscripten-core/emscripten#24076, we hit error like:
Now this issue has been fixed upstream but we haven't updated emscripten yet resulting in the todo in gn/standalone/BUILD.gn