LLVM and visual studio .obj binary incompatibility

Does anyone know if LLVM binary compatibility is planned for visual studio combinations of .obj and static .lib files? Right now, I can only link LLVM-generated .obj files with dynamic libraries loading DLLs at runtime (compiled from visual studio).

There is probably very little chance that binary compatibility will be performed between the two compilers, does anyone know why it is so difficult to achieve this between compilers for the same platform?

+5
source share
2 answers

As Neil said, compatibility includes things like a calling convention, a name change, etc. Although these two are the least possible problems. LLVM already knows about all window-related calls (stdcall, fastcall, thiscall), so you can call stuff from .dll.

If we are talking about C ++ code, then the main problem is C ++ ABI: vtable layout, rtti implementation, etc. clang follows Itanium C ++ ABI (which, for example, uses gcc, among others), VCPP does not, and all of these, unfortunately, are undocumented. There is some work in this direction, so the material may begin to work, apparently. Please note that most likely some parts will never be covered, for example. seh based on exception handling on win32 as it is patented.

C- , , ++ ABI, C-/.

+8

, , , .., ++ . ( MS , ) .

+1

All Articles