1
1
use crate :: abi:: { self , Abi , Align , FieldsShape , Size } ;
2
2
use crate :: abi:: { HasDataLayout , TyAbiInterface , TyAndLayout } ;
3
- use crate :: spec:: { self , HasTargetSpec } ;
3
+ use crate :: spec:: { self , HasTargetSpec , HasWasmCAbiOpt } ;
4
4
use rustc_span:: Symbol ;
5
5
use std:: fmt;
6
6
use std:: str:: FromStr ;
@@ -764,7 +764,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
764
764
) -> Result < ( ) , AdjustForForeignAbiError >
765
765
where
766
766
Ty : TyAbiInterface < ' a , C > + Copy ,
767
- C : HasDataLayout + HasTargetSpec ,
767
+ C : HasDataLayout + HasTargetSpec + HasWasmCAbiOpt ,
768
768
{
769
769
if abi == spec:: abi:: Abi :: X86Interrupt {
770
770
if let Some ( arg) = self . args . first_mut ( ) {
@@ -821,7 +821,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
821
821
"sparc" => sparc:: compute_abi_info ( cx, self ) ,
822
822
"sparc64" => sparc64:: compute_abi_info ( cx, self ) ,
823
823
"nvptx64" => {
824
- if cx. target_spec ( ) . adjust_abi ( abi) == spec:: abi:: Abi :: PtxKernel {
824
+ if cx. target_spec ( ) . adjust_abi ( cx , abi) == spec:: abi:: Abi :: PtxKernel {
825
825
nvptx64:: compute_ptx_kernel_abi_info ( cx, self )
826
826
} else {
827
827
nvptx64:: compute_abi_info ( self )
@@ -830,7 +830,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
830
830
"hexagon" => hexagon:: compute_abi_info ( self ) ,
831
831
"riscv32" | "riscv64" => riscv:: compute_abi_info ( cx, self ) ,
832
832
"wasm32" | "wasm64" => {
833
- if cx. target_spec ( ) . adjust_abi ( abi) == spec:: abi:: Abi :: Wasm {
833
+ if cx. target_spec ( ) . adjust_abi ( cx , abi) == spec:: abi:: Abi :: Wasm {
834
834
wasm:: compute_wasm_abi_info ( self )
835
835
} else {
836
836
wasm:: compute_c_abi_info ( cx, self )
0 commit comments