3 ms·
Uh, what? Here's a simple example, clang supports windows. Clang's "bundled" standard library, libc++, doesn't support windows. Clang also not only allows but i
by kllrnohj 7y ago
Uh, what? Here's a simple example, clang supports windows. Clang's "bundled" standard library, libc++, doesn't support windows. Clang also not only allows but is commonly used with libstd++ instead.
Mixing and matching compilers and standard libraries is not only possible it's common. Especially when cross-compiling enters the picture.
There is no bundling of any kind in any concept of that word, practically or technically, between C++ compilers and standard libraries. This is also a good thing, it makes porting C++ to new platforms far more easier than it otherwise would be.
They even have independent feature compliance sections. Clang & G++ both support new C++ features independently of whether or not their "bundled" standard library does yet.
- rumanator 7y ago> Clang's "bundled" standard library, libc++, doesn't support windows. You're an awful troll. Clang on Windows is distributed to use the system installation of libstdc++, not clang's experimental libc++. https://clang.llvm.org/get_started.html https://clang.llvm.org/get_started.html > Clang also not only allows but is commonly used with libstd++ instead. That's because libc++ is clang's experimental implementation of the C++ standard library, developed to give the project an alternative library to GPLv3 implementations such as libstdc++. https://libcxx.llvm.org/ https://libcxx.llvm.org/ > There is no bundling of any kind in any concept of that word, practically or technically, between C++ compilers and standard libraries. Your personal assertion contrasts with reality. Even your cherry-picked example contradicts your claim, as clang's history as a drop-in replacement for GCC and therefore it's reliance on GCC's libstdc++ is well documented.
- kllrnohj 7y ago> You're an awful troll. Chill on the name calling. > Clang on Windows is distributed to use the system installation of libstdc++ Windows doesn't have a default system installation of C++ at all nor is it libstdc++. You can use clang on windows with libstdc++, but that's a MingW port and not at all "native" to the platform. Windows' standard C++ runtime is the Visual C++ Redistributable and there are many versions of it that all coexist simultaneously. Which one is used depends on what the application was compiled against, there is no "system version" of it. Runtimes that Clang can also use. > That's because libc++ is clang's experimental implementation of the C++ standard library There is nothing experimental about libc++ at all. It is the standard for some platforms, like Android and MacOS/iOS. In fact Apple removed support for using libstdc++ entirely with Xcode 10. And before Xcode 10 you got a choice between libstdc++ & libc++, because again the C++ standard library is not bundled. Similarly on Android there used to be a choice between not just libstdc++ and libc++ but also stlport was an option. Now only libc++ is supported, and it's not provided by the system at all.