Winapi ClangSharp Issues

@tannergooding oh boy... clang 13 seems to have changed the way calling conventions are evaluated, it seems our "winapi" detection has broken!
No description
7 Replies
Perksey
Perksey3y ago
.
tannergooding
tannergooding3y ago
oh fun they also changed spacing on stuff in clang 14, which has likewise been painful
Perksey
Perksey3y ago
currently downloading libclang 12 to verify oh actually it might not be a bug a community contribution changed some of the common stuff so it might just be that we're no longer ignoring call convs again? will xref with terrafx ah ok it appears it's STDMETHODCALLTYPE which is getting it and now i'm unsure whether we're doing the right thing TerraFX uses winapi so yeah this is a silk issue @tannergooding is there any impact having [Stdcall] on x64? i'm unsure of how to proceed with STDMETHODCALLTYPE given that we run clang in -m32 terrafx seems to ignore it
tannergooding
tannergooding3y ago
stdcall == winapi, and on x64 its effectively ignored I did something for TerraFX to ensure it wasn't present, but I don't remember what
Perksey
Perksey3y ago
is that a general rule of thumb to assume that stdcall/cdecl differences can effectively be ignored on x64
tannergooding
tannergooding3y ago
Yeah. On x64 Windows, there is currently just Win64 calling convention We might get vectorcall someday, but not today Likewise on Unix, there is effectively only cdecl and everything else is effectively "ignored" (at least on RyuJIT, I don't know if Mono does something here) CallConvMemberFunction can also be impactful (which is like Thiscall but without some of the legacy problems and it can be combined with other calling conventions to correctly represent x86 Windows conventions; like thiscall + stdcall for COM)
Perksey
Perksey3y ago
ok with all of that i think i've come to the conclusion silk.net's conventions were bugged... again!