Some key learnings:
If you want the calling conventions to appear correctly in DllImport, -m32 needs to be passed to clangArguments in the config. I couldn't find proper documentation, but, all signs point to DllImport ignoring the CallingConvention when the library being loaded is 64-bit.
I considered forcing -m32 to be passed into clang by default, but wasn't sure what side effects that might have.
It might be wise to add the information about passing -m32 to clang via the .config to the readme or documentation somewhere. Not sure where the best place for that is.
Some key learnings: If you want the calling conventions to appear correctly in DllImport,
-m32
needs to be passed to clangArguments in the config. I couldn't find proper documentation, but, all signs point to DllImport ignoring the CallingConvention when the library being loaded is 64-bit.I considered forcing
-m32
to be passed into clang by default, but wasn't sure what side effects that might have.