mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-10 09:38:07 +00:00
Only enable SIMD when using the LLVM backend.
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
This commit is contained in:
parent
f6240721ea
commit
361a027ec9
@ -317,7 +317,10 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
|
|||||||
|
|
||||||
if !utils::is_wasm_binary(&wasm_binary) {
|
if !utils::is_wasm_binary(&wasm_binary) {
|
||||||
let mut features = wabt::Features::new();
|
let mut features = wabt::Features::new();
|
||||||
|
if options.backend == Backend::LLVM {
|
||||||
|
// SIMD is only supported in the LLVM backend for now
|
||||||
features.enable_simd();
|
features.enable_simd();
|
||||||
|
}
|
||||||
wasm_binary = wabt::wat2wasm_with_features(wasm_binary, features)
|
wasm_binary = wabt::wat2wasm_with_features(wasm_binary, features)
|
||||||
.map_err(|e| format!("Can't convert from wast to wasm: {:?}", e))?;
|
.map_err(|e| format!("Can't convert from wast to wasm: {:?}", e))?;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user