1
Fork 0

Select the proper x86_64 ABI based first and foremost on the specified calling convention instead of just looking at the selected platform

This commit is contained in:
CensoredUsername 2016-08-30 03:54:29 +02:00
parent eef4434bf8
commit 0e30446259

View file

@ -484,7 +484,9 @@ impl FnType {
match &ccx.sess().target.target.arch[..] {
"x86" => cabi_x86::compute_abi_info(ccx, self),
"x86_64" => if ccx.sess().target.target.options.is_like_windows {
"x86_64" => if abi == Abi::SysV64 {
cabi_x86_64::compute_abi_info(ccx, self);
} else if abi == Abi::Win64 || ccx.sess().target.target.options.is_like_windows {
cabi_x86_win64::compute_abi_info(ccx, self);
} else {
cabi_x86_64::compute_abi_info(ccx, self);