Add flags to allow wasm SIMD instructions (#910)
Add `--enable-simd` flag to `clif-util wasm`
This commit is contained in:
committed by
Benjamin Bouvier
parent
ca6449626f
commit
2b49b51306
@@ -53,6 +53,8 @@ fn read_file(path: &Path) -> io::Result<Vec<u8>> {
|
||||
}
|
||||
|
||||
fn handle_module(path: &Path, flags: &Flags, return_mode: ReturnMode) {
|
||||
let mut features = Features::new();
|
||||
features.enable_all();
|
||||
let data = match path.extension() {
|
||||
None => {
|
||||
panic!("the file extension is not wasm or wat");
|
||||
@@ -61,8 +63,6 @@ fn handle_module(path: &Path, flags: &Flags, return_mode: ReturnMode) {
|
||||
Some("wasm") => read_file(path).expect("error reading wasm file"),
|
||||
Some("wat") => {
|
||||
let wat = read_file(path).expect("error reading wat file");
|
||||
let mut features = Features::new();
|
||||
features.enable_all();
|
||||
match wat2wasm_with_features(&wat, features) {
|
||||
Ok(wasm) => wasm,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user