3 ms·
Anyone know about LLVM and their plans? The reason I ask is that I'm starting to do some Rust code and one of the nice features is that they use C++ name mangl
by mikekchar 12y ago
Anyone know about LLVM and their plans? The reason I ask is that I'm starting to do some Rust code and one of the nice features is that they use C++ name mangling. I'm guessing I shouldn't assume that there will be interoperation with installed C++ libraries in the short-mid term :-(.
- kibwen 12y agoNote that even though Rust does name mangling, it does not necessarily mangle names exactly as C++ does (and different C++ compilers on different platforms may already differ on how they perform mangling, it's not standardized).
- the_why_of_y 12y agoLLVM does not need to worry about compatibility here because its libc++ is relatively new and was designed with C++11 requirements in mind, whereas GNU libstdc++ is >20 years old and could not possibly have anticipated these new requirements. OTOH on Linux you're most likely using clang together with libstdc++, and whether that would use old or new ABI would depend on whether the magic macro is defined in libstdc++ or by g++. The article says "the C++ standard library headers installed by the libstdc++-devel RPM will have a different default value for the _GLIBCXX_USE_CXX11_ABI macro" so that sounds like clang should do the same thing as g++ here.