Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions lib/dispatcher/client-h1.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,18 @@ function lazyllhttp () {
const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined

let mod
try {
mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))
} catch {
/* istanbul ignore next */

// We are disabling wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
if (process.env.UNDICI_NO_WASM_SIMD || process.arch === 'ppc64') {
try {
mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))
/* istanbul ignore next */
} catch {
}
}

/* istanbul ignore next */
if (!mod) {
// We could check if the error was caused by the simd option not
// being enabled, but the occurring of this other error
// * https://github.com/emscripten-core/emscripten/issues/11495
Expand Down
Loading