1
Fork 0

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
This commit is contained in:
Yuki Okushi 2021-01-12 07:59:06 +09:00 committed by GitHub
commit edcfe7b629
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -605,10 +605,11 @@ impl<'a, Ty> FnAbi<'a, Ty> {
"nvptx64" => nvptx64::compute_abi_info(self), "nvptx64" => nvptx64::compute_abi_info(self),
"hexagon" => hexagon::compute_abi_info(self), "hexagon" => hexagon::compute_abi_info(self),
"riscv32" | "riscv64" => riscv::compute_abi_info(cx, self), "riscv32" | "riscv64" => riscv::compute_abi_info(cx, self),
"wasm32" if cx.target_spec().os != "emscripten" => { "wasm32" => match cx.target_spec().os.as_str() {
wasm32_bindgen_compat::compute_abi_info(self) "emscripten" | "wasi" => wasm32::compute_abi_info(cx, self),
} _ => wasm32_bindgen_compat::compute_abi_info(self),
"wasm32" | "asmjs" => wasm32::compute_abi_info(cx, self), },
"asmjs" => wasm32::compute_abi_info(cx, self),
a => return Err(format!("unrecognized arch \"{}\" in target specification", a)), a => return Err(format!("unrecognized arch \"{}\" in target specification", a)),
} }