Skip to content

Commit

Permalink
feat(wasm-builder,wasm-opt): use only mvp features, enable sign-ext (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ukint-vs authored Jul 25, 2023
1 parent dd05e9e commit 3eeea24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/wasm-builder/src/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ pub fn do_optimization(
.arg(format!("-O{optimization_level}"))
.arg("-o")
.arg(dest_optimized)
.arg("-mvp")
.arg("--enable-sign-ext")
// the memory in our module is imported, `wasm-opt` needs to be told that
// the memory is initialized to zeroes, otherwise it won't run the
// memory-packing pre-pass.
Expand Down Expand Up @@ -277,6 +279,8 @@ pub fn do_optimization(
"z" => OptimizationOptions::new_optimize_for_size_aggressively(),
_ => panic!("Invalid optimization level {}", optimization_level),
}
.mvp_features_only()
.enable_feature(wasm_opt::Feature::SignExt)
.shrink_level(wasm_opt::ShrinkLevel::Level2)
.add_pass(Pass::Dae)
.add_pass(Pass::Vacuum)
Expand Down

0 comments on commit 3eeea24

Please sign in to comment.