Skip to content

Commit edcfe7b

Browse files
authored
Rollup merge of #79998 - devsnek:wasm32-bindgen-compat, r=alexcrichton
Use correct ABI for wasm32 by default Introduces `wasm32-unknown-bindgen` for those wishing to use the bindgen compat abi. `wasm32-*` now uses the correct abi by default. Fixes rustwasm/team#291
2 parents 1d83f98 + 5ba3be1 commit edcfe7b

File tree

1 file changed

+5
-4
lines changed
  • compiler/rustc_target/src/abi/call

1 file changed

+5
-4
lines changed

compiler/rustc_target/src/abi/call/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,11 @@ impl<'a, Ty> FnAbi<'a, Ty> {
605605
"nvptx64" => nvptx64::compute_abi_info(self),
606606
"hexagon" => hexagon::compute_abi_info(self),
607607
"riscv32" | "riscv64" => riscv::compute_abi_info(cx, self),
608-
"wasm32" if cx.target_spec().os != "emscripten" => {
609-
wasm32_bindgen_compat::compute_abi_info(self)
610-
}
611-
"wasm32" | "asmjs" => wasm32::compute_abi_info(cx, self),
608+
"wasm32" => match cx.target_spec().os.as_str() {
609+
"emscripten" | "wasi" => wasm32::compute_abi_info(cx, self),
610+
_ => wasm32_bindgen_compat::compute_abi_info(self),
611+
},
612+
"asmjs" => wasm32::compute_abi_info(cx, self),
612613
a => return Err(format!("unrecognized arch \"{}\" in target specification", a)),
613614
}
614615

0 commit comments

Comments
 (0)