File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,17 @@ function lazyllhttp () {
65
65
66
66
let mod
67
67
68
- // We are disabling wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
69
- if ( process . env . UNDICI_NO_WASM_SIMD !== '1' || process . arch !== 'ppc64' ) {
68
+ // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
69
+ let useWasmSIMD = process . arch !== 'ppc64'
70
+
71
+ // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior
72
+ if ( process . env . UNDICI_NO_WASM_SIMD === '1' ) {
73
+ useWasmSIMD = true
74
+ } else if ( process . env . UNDICI_NO_WASM_SIMD === '0' ) {
75
+ useWasmSIMD = false
76
+ }
77
+
78
+ if ( useSIMD ) {
70
79
try {
71
80
mod = new WebAssembly . Module ( require ( '../llhttp/llhttp_simd-wasm.js' ) )
72
81
/* istanbul ignore next */
You can’t perform that action at this time.
0 commit comments