diff --git a/src/lib.rs b/src/lib.rs index e8cf50e..d28702a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -483,7 +483,11 @@ fn run_wasm_opt( cmd.arg("--enable-threads"); cmd.arg("--enable-reference-types"); cmd.arg("--no-validation"); - cmd.arg("--translate-to-exnref"); + // `--emit-exnref` runs the legacy-EH-to-exnref translation at the end of + // the whole pass pipeline regardless of argument order (unlike + // `--translate-to-exnref`, which is an ordinary pass executed at its + // position on the command line). + cmd.arg("--emit-exnref"); if !build.enable_producers_section(profile) { cmd.arg("--strip-producers"); @@ -657,7 +661,7 @@ fn run_or_download( } fn install_wasm_opt(path: &ToolPath, config: &Config) -> Result<()> { - let tag = "version_123"; + let tag = "version_130"; let binaryen_url = |target: &str| { let mut url = "https://github.com/WebAssembly/binaryen/releases/download/".to_string(); url.push_str(tag);