Skip to content

Commit 9d3edce

Browse files
committed
special case aapcs
1 parent 21d3248 commit 9d3edce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csbindgen/src/parser.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ fn parse_method(item: FnItem, options: &BindgenOptions) -> Option<ExternMethod>
103103
eprintln!("sysv64 is the calling convention for AMD64 non-windows, consider using \"system\" instead.");
104104
panic!("Cannot emit `sysv64` on non-AMD64 and/or windows target.");
105105
}
106+
else if abi_str.contains("aapcs") {
107+
eprintln!("ARM is an extremely complex landscape and not all possible combinations can be checked. Emitting at the user's risk.");
108+
"WinApi"
109+
}
106110
else if abi_str.contains("C") || abi_str.contains("cdecl") || abi_str.contains("win64") || abi_str.contains("sysv64") || abi_str.contains("aapcs") {"Cdecl"}
107111
else {
108112
// This is only ever hit for the `Rust`, `fastcall`, and `efiapi` calling conventions, none of which are supported by C# (as of .NET 9)

0 commit comments

Comments
 (0)