diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-01-26 11:09:06 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2021-01-26 11:09:06 +0100 |
| commit | 36df9c55e595c33c27095e0b2a4822adfa2da0c6 (patch) | |
| tree | 8276ee11742fa74897e7dabd63bbe574af7a5b75 /compiler/rustc_target/src/abi | |
| parent | e7a056fe20f7ec5a475923ff2f4eda8ca9e1a74b (diff) | |
| download | rust-36df9c55e595c33c27095e0b2a4822adfa2da0c6.tar.gz rust-36df9c55e595c33c27095e0b2a4822adfa2da0c6.zip | |
Revert "Share wasm-bindgen compat abi selection code"
This reverts commit e7a056fe20f7ec5a475923ff2f4eda8ca9e1a74b.
Diffstat (limited to 'compiler/rustc_target/src/abi')
| -rw-r--r-- | compiler/rustc_target/src/abi/call/mod.rs | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/compiler/rustc_target/src/abi/call/mod.rs b/compiler/rustc_target/src/abi/call/mod.rs index 521aea6dd72..2cbd52bf3e9 100644 --- a/compiler/rustc_target/src/abi/call/mod.rs +++ b/compiler/rustc_target/src/abi/call/mod.rs @@ -1,6 +1,6 @@ use crate::abi::{self, Abi, Align, FieldsShape, Size}; use crate::abi::{HasDataLayout, LayoutOf, TyAndLayout, TyAndLayoutMethods}; -use crate::spec::{self, HasTargetSpec, Target}; +use crate::spec::{self, HasTargetSpec}; mod aarch64; mod amdgpu; @@ -631,10 +631,9 @@ 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 use_wasm_bindgen_compat_abi(cx.target_spec()) { - wasm32_bindgen_compat::compute_abi_info(self) - } else { - 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)), @@ -643,14 +642,3 @@ impl<'a, Ty> FnAbi<'a, Ty> { Ok(()) } } - -pub fn use_wasm_bindgen_compat_abi(target_spec: &Target) -> bool { - if target_spec.arch.as_str() == "wasm32" { - match target_spec.os.as_str() { - "emscripten" | "wasi" => false, - _ => true, - } - } else { - false - } -} |
