Skip to content

Commit 0e30446

Browse files
Select the proper x86_64 ABI based first and foremost on the specified calling convention instead of just looking at the selected platform
1 parent eef4434 commit 0e30446

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_trans/abi.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,9 @@ impl FnType {
484484

485485
match &ccx.sess().target.target.arch[..] {
486486
"x86" => cabi_x86::compute_abi_info(ccx, self),
487-
"x86_64" => if ccx.sess().target.target.options.is_like_windows {
487+
"x86_64" => if abi == Abi::SysV64 {
488+
cabi_x86_64::compute_abi_info(ccx, self);
489+
} else if abi == Abi::Win64 || ccx.sess().target.target.options.is_like_windows {
488490
cabi_x86_win64::compute_abi_info(ccx, self);
489491
} else {
490492
cabi_x86_64::compute_abi_info(ccx, self);

0 commit comments

Comments
 (0)