https://issues.dlang.org/show_bug.cgi?id=24623

          Issue ID: 24623
           Summary: Rename version CppRuntime_Clang/Gcc to
                    CppRuntime_libcpp/libstdcpp.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: johanenge...@weka.io

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.

--

Reply via email to