================
@@ -456,21 +492,15 @@ ifeq (1, $(USE_SYSTEM_STDLIB))
         endif
         CXXFLAGS += -nostdlib++ -nostdinc++ -cxx-isystem 
$(SDKROOT)/usr/include/c++/v1
         LDFLAGS += -L$(SDKROOT)/usr/lib -Wl,-rpath,$(SDKROOT)/usr/lib -lc++
+    else
+        ifneq (,$(findstring clang,$(CC)))
+            # Force clang looking for the gcc's headers at specific rootfs 
folder.
+            CXXFLAGS += -stdlib=libstdc++ $(GCC_TOOLCHAIN_FLAGS)
----------------
labath wrote:

Okay, but that is a clang configuration thing (`CLANG_DEFAULT_CXX_STDLIB` cmake 
option), right? Can't you set it to the actual c++ library that you intend to 
use instead of overriding it here? Or use a clang wrapper or a [configuration 
file](https://clang.llvm.org/docs/UsersManual.html#configuration-files) to 
override it externally? (FWIW, that's what we do internally to adapt the test 
suite to our (strange) internal infrastructure)

It's nice (maybe) that `-lstdc++` is ignored on windows, but I still this this 
is the wrong thing to do. `libstdc++` is definitely not the system default 
everywhere.

https://github.com/llvm/llvm-project/pull/99266
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to