diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-01-12 07:59:06 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-12 07:59:06 +0900 |
| commit | edcfe7b6296aff0cf5c52f0c8bc972b0b156616d (patch) | |
| tree | db329f49c71a8dd69a5b6b126c26437050063089 | |
| parent | 1d83f9828f9dfb5d752c8f0e3e71a9029a917de7 (diff) | |
| parent | 5ba3be1d60618fcd7fb819fdee4590ec048f190f (diff) | |
| download | rust-edcfe7b6296aff0cf5c52f0c8bc972b0b156616d.tar.gz rust-edcfe7b6296aff0cf5c52f0c8bc972b0b156616d.zip | |
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 https://github.com/rustwasm/team/issues/291
| -rw-r--r-- | compiler/rustc_target/src/abi/call/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index 5de9a8dfa7a..a9e595d11e7 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -605,10 +605,11 @@ impl<'a, Ty> FnAbi<'a, Ty> { "nvptx64" => nvptx64::compute_abi_info(self), "hexagon" => hexagon::compute_abi_info(self), "riscv32" | "riscv64" => riscv::compute_abi_info(cx, self), - "wasm32" if cx.target_spec().os != "emscripten" => { - wasm32_bindgen_compat::compute_abi_info(self) - } - "wasm32" | "asmjs" => wasm32::compute_abi_info(cx, self), + "wasm32" => match cx.target_spec().os.as_str() { + "emscripten" | "wasi" => wasm32::compute_abi_info(cx, self), + _ => wasm32_bindgen_compat::compute_abi_info(self), + }, + "asmjs" => wasm32::compute_abi_info(cx, self), a => return Err(format!("unrecognized arch \"{}\" in target specification", a)), } |
