File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -761,7 +761,7 @@ impl Default for TargetOptions {
761
761
}
762
762
763
763
impl Target {
764
- /// Given a function ABI, turn "System" into the correct ABI for this target.
764
+ /// Given a function ABI, turn it into the correct ABI for this target.
765
765
pub fn adjust_abi ( & self , abi : Abi ) -> Abi {
766
766
match abi {
767
767
Abi :: System => {
@@ -771,6 +771,16 @@ impl Target {
771
771
Abi :: C
772
772
}
773
773
} ,
774
+ // These ABI kinds are ignored on non-x86 Windows targets.
775
+ // See https://docs.microsoft.com/en-us/cpp/cpp/argument-passing-and-naming-conventions
776
+ // and the individual pages for __stdcall et al.
777
+ Abi :: Stdcall | Abi :: Fastcall | Abi :: Vectorcall | Abi :: Thiscall => {
778
+ if self . options . is_like_windows && self . arch != "x86" {
779
+ Abi :: C
780
+ } else {
781
+ abi
782
+ }
783
+ } ,
774
784
abi => abi
775
785
}
776
786
}
You can’t perform that action at this time.
0 commit comments