[cfe-dev] libc++ in Windows

Stephen Lin swlin at post.harvard.edu
Thu Jul 4 20:22:10 PDT 2013


> MSHTML has a COM interface. And I wouldn't consider it a core library by
> any stretch. Dunno about JSCRIPT but I'll bet that it is the same case.
> For core (OS) functionality, it is in the best interest of MS to not
> block access to other compiler vendors. Also, historically MS promoted
> other languages over C++ and that means that its libraries hide its C++
> implementation behind a COM/C interface.
>
> To recap: there is no problem using C++ runtimes other than MS on
> Windows. MinGW does it, Borland does it...
>

Just curious, because I couldn't find much discussion of COM in the
archives...do you know if Clang currently supports enough of the
ms-cxx-abi to use and generate COM objects and interfaces in C++?

It's been awhile since I've used COM so I might be misremembering what
it is, but my understanding is that COM idl files can be used to
generate header files that can either be used in C (using explicit
tables of function pointers to implement interfaces and dynamic
dispatch) or C++ via inheritance, and MSVC's C and C++ ABIs are
designed such that both alternatives will generate code that conforms
to the same ABI using MSVC, which is stable across MSVC versions.

Also, as I understand it, having C++ objects conform to the COM ABI
primarily depends on things like virtual table layout but has no
dependence on things like name mangling, since all dispatch is
indirect through table lookups--is that correct? If so, is COM ABI
support complete or is there anyone working on that an an explicit
subgoal of full MSVC ABI support?

Stephen



More information about the cfe-dev mailing list