Bug 24623 – Rename version CppRuntime_Clang/Gcc to CppRuntime_libcxx/libstdcxx.

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-06-22T09:40:59Z
Last change time
2024-06-30T11:45:38Z
Keywords
pull
Assigned to
No Owner
Creator
johanengelen

Comments

Comment #0 by johanengelen — 2024-06-22T09:40:59Z
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.
Comment #1 by dlang-bot — 2024-06-22T09:45:03Z
@JohanEngelen updated dlang/dmd pull request #16610 "Rename CppRuntime_Clang/Gcc to CppRuntime_libcpp/libstdcpp https://issues.dlang.org/show_bug.cgi?id=24546 ." fixing this issue: - Rename CppRuntime_Clang/Gcc to CppRuntime_libcpp/libstdcpp. Add libcpp and libstdcpp -target= option recognition. Fix bugzilla 24623 https://issues.dlang.org/show_bug.cgi?id=24623 https://github.com/dlang/dmd/pull/16610
Comment #2 by dlang-bot — 2024-06-22T12:42:31Z
dlang/dmd pull request #16610 "Rename CppRuntime_Clang/Gcc to CppRuntime_libcpp/libstdcpp." was merged into master: - 349b493810d9fe6f1997df93d23194589f170584 by Johan Engelen: Fix bugzilla issue 24623: Rename CppRuntime_Clang/Gcc to CppRuntime_libcpp/libstdcpp. Add libcpp and libstdcpp -target= option recognition. https://github.com/dlang/dmd/pull/16610
Comment #3 by johanengelen — 2024-06-22T17:04:13Z
libcpp is the GCC C PreProcessing library). libstdc++v3 refers to itself as (lib)stdcxx in code. libc++ similarly. Changed title of bug report: cpp --> cxx
Comment #4 by dlang-bot — 2024-06-30T11:45:38Z
dlang/dmd pull request #16613 "Fix bugzilla issue 24623 followup." was merged into master: - 988f31a2767417c4ccb595fce493835baa121e10 by Johan Engelen: Fix bugzilla issue 24623 followup. Rename CppRuntime to _LLVM and _GNU Also accept c++ for cxx in target string. https://github.com/dlang/dmd/pull/16613