There's a few missing bits to get our API really C compatible; or at least there are some places that are not 32-bit (x86) compatible.
Example: mismatched calling conventions:
[build] D:\Dev\iree\iree\vm\stack_test.cc(200): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast
[build] D:\Dev\iree\iree\vm\stack_test.cc(223): error C2440: '=': cannot convert from 'void (__cdecl *)(void *)' to 'iree_vm_ref_destroy_t'
Example: struct as result:
[build] D:\Dev\iree\iree/vm/module_abi_cc.h(84): error C2440: '=': cannot convert from 'iree_string_view_t (__cdecl *)(void *)' to 'iree_string_view_t (__stdcall *)(void *)'
[build] D:\Dev\iree\iree/vm/module_abi_cc.h(84): note: This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Doing a scrub of these errors (found when compiling for x86 with msvc) would be good for all targets, and have the side-effect of allowing us to build on x86 (which is required to use msvc asan). It may also be a good time to review IREE_API_EXPORT/etc to make sure they do what we want (they are mostly placeholders).
There's a few missing bits to get our API really C compatible; or at least there are some places that are not 32-bit (x86) compatible.
Example: mismatched calling conventions:
Example: struct as result:
Doing a scrub of these errors (found when compiling for x86 with msvc) would be good for all targets, and have the side-effect of allowing us to build on x86 (which is required to use msvc asan). It may also be a good time to review IREE_API_EXPORT/etc to make sure they do what we want (they are mostly placeholders).