11use crate :: abi:: { self , Abi , Align , FieldsShape , Size } ;
22use crate :: abi:: { HasDataLayout , TyAbiInterface , TyAndLayout } ;
3- use crate :: spec:: { self , HasTargetSpec } ;
3+ use crate :: spec:: { self , HasTargetSpec , HasWasmCAbiOpt } ;
44use rustc_span:: Symbol ;
55use std:: fmt;
66use std:: str:: FromStr ;
@@ -764,7 +764,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
764764 ) -> Result < ( ) , AdjustForForeignAbiError >
765765 where
766766 Ty : TyAbiInterface < ' a , C > + Copy ,
767- C : HasDataLayout + HasTargetSpec ,
767+ C : HasDataLayout + HasTargetSpec + HasWasmCAbiOpt ,
768768 {
769769 if abi == spec:: abi:: Abi :: X86Interrupt {
770770 if let Some ( arg) = self . args . first_mut ( ) {
@@ -821,7 +821,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
821821 "sparc" => sparc:: compute_abi_info ( cx, self ) ,
822822 "sparc64" => sparc64:: compute_abi_info ( cx, self ) ,
823823 "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 {
825825 nvptx64:: compute_ptx_kernel_abi_info ( cx, self )
826826 } else {
827827 nvptx64:: compute_abi_info ( self )
@@ -830,7 +830,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
830830 "hexagon" => hexagon:: compute_abi_info ( self ) ,
831831 "riscv32" | "riscv64" => riscv:: compute_abi_info ( cx, self ) ,
832832 "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 {
834834 wasm:: compute_wasm_abi_info ( self )
835835 } else {
836836 wasm:: compute_c_abi_info ( cx, self )
0 commit comments