[Dlang-internal] Rename CppRuntime_* versions to actual cpp libraries
Johan
j at j.nl
Sat May 4 22:53:29 UTC 2024
Hi all,
There is unfortunately an error (!) in druntime CppRuntime
version naming.
I think this arises from the wrong assumption that libstdc++ is
bound to GCC and libc++ to clang. This is _not_ the case. For
those in the know, it is actually very confusing to read
`CppRuntime_Clang` in the code. "What is that?!" Clang works with
both libstdc++ and libc++ and it very much depends on the
OS/installation/user which library is actually used.
I had to find this bit in `d_do_test.d` to learn what it stands
for:
```
version (CppRuntime_Gcc)
envData.cxxCompatFlags = " -L-lstdc++ -L--no-demangle";
else version (CppRuntime_Clang)
envData.cxxCompatFlags = " -L-lc++ -L--no-demangle";
```
Ah, ok, so `CppRuntime_Clang` stands for libc++.
Please, please rename
`CppRuntime_Gcc` => `CppRuntime_libstdcpp`
`CppRuntime_Clang` => `CppRuntime_libcpp`
The `-target` option should be fixed similarly, but please debate
that separately elsewhere.
I am happy to submit the patch with the rename, _after_ I get
your go-ahead that it will be merged.
Thank you very very much!
Johan
More information about the Dlang-internal
mailing list