fix ZST handling for Windows ABIs on MSVC target
This commit is contained in:
@@ -2815,12 +2815,17 @@ impl Target {
|
||||
Abi::EfiApi if self.arch == "x86_64" => Abi::Win64 { unwind: false },
|
||||
Abi::EfiApi => Abi::C { unwind: false },
|
||||
|
||||
// See commentary in `is_abi_supported`.
|
||||
Abi::Stdcall { .. } | Abi::Thiscall { .. } if self.arch == "x86" => abi,
|
||||
Abi::Stdcall { unwind } | Abi::Thiscall { unwind } => Abi::C { unwind },
|
||||
Abi::Fastcall { .. } if self.arch == "x86" => abi,
|
||||
// See commentary in `is_abi_supported`: we map these ABIs to "C" when they do not make sense.
|
||||
Abi::Stdcall { .. } | Abi::Thiscall { .. } | Abi::Fastcall { .. }
|
||||
if self.arch == "x86" =>
|
||||
{
|
||||
abi
|
||||
}
|
||||
Abi::Vectorcall { .. } if ["x86", "x86_64"].contains(&&self.arch[..]) => abi,
|
||||
Abi::Fastcall { unwind } | Abi::Vectorcall { unwind } => Abi::C { unwind },
|
||||
Abi::Stdcall { unwind }
|
||||
| Abi::Thiscall { unwind }
|
||||
| Abi::Fastcall { unwind }
|
||||
| Abi::Vectorcall { unwind } => Abi::C { unwind },
|
||||
|
||||
// The Windows x64 calling convention we use for `extern "Rust"`
|
||||
// <https://learn.microsoft.com/en-us/cpp/build/x64-software-conventions#register-volatility-and-preservation>
|
||||
|
||||
Reference in New Issue
Block a user