Only enable SIMD when using the LLVM backend.

Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
This commit is contained in:
nlewycky 2019-07-24 14:10:09 -07:00 committed by GitHub
parent f6240721ea
commit 361a027ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
features.enable_simd(); if options.backend == Backend::LLVM {
// SIMD is only supported in the LLVM backend for now
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))?;
} }