回复: [Windows toolchain] link failures from command prompt

I look over clang source, It have Microsoft CXXABI.cpp in clang/lib/CodeGen/,support Microsoft C++ ABI;I recommend to open a default C + + ABI’s cmake variable when you use VisualStudio + cmake build clang when the default C + + ABI for the Microsoft C + + ABI, and in the clang’s “driver” to support dynamically assigned - ABI = Microsoft or - ABI = Itanium,

As mentioned in the bug (http://llvm.org/bugs/show_bug.cgi?id=17428#c3), the best supported way to use the MS C++ ABI is to use clang-cl.exe. Joao mentions the other way to switch the C++ ABI dynamically, but it’s an internal -cc1 flag subject to change.

Long term, if the OS is set to win32 (not mingw32) via the --target= flag, I would like that to imply the Microsoft C++ ABI, rather than the weird not-mingw-but-still-Itanium hybrid we use today. That will require changes to the test suite, and I’d like to fix virtual inheritance first.

When I use clang-cl,It hava too much error:
D:\LLVM[x64]>clang-cl base.cpp
error: cannot mangle RTTI descriptors for type ‘failure’ yet
error: cannot mangle the name of type ‘failure’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘system_error’ yet
error: cannot mangle the name of type ‘system_error’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘runtime_error’ yet
error: cannot mangle the name of type ‘runtime_error’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘exception’ yet
error: cannot mangle the name of type ‘exception’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘failure’ yet
error: cannot mangle the name of type ‘failure’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘system_error’ yet
error: cannot mangle the name of type ‘system_error’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘runtime_error’ yet
error: cannot mangle the name of type ‘runtime_error’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘exception’ yet
error: cannot mangle the name of type ‘exception’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘failure’ yet
error: cannot mangle the name of type ‘failure’ into RTTI descriptors yet
error: cannot mangle RTTI descriptors for type ‘system_error’ yet
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

-cfe-dev

RTTI is not supported yet. You can disable it with /GR-. Yes, this needs to be documented.