================
@@ -386,6 +386,11 @@ ifeq (,$(filter 1, $(USE_LIBSTDCPP) $(USE_LIBCPP) 
$(USE_SYSTEM_STDLIB)))
     ifneq "$(LIBCPP_INCLUDE_TARGET_DIR)" ""
       CXXFLAGS += -cxx-isystem $(LIBCPP_INCLUDE_TARGET_DIR)
     endif
+
+       # If `-nostdlib++` is not passed, clang will link to the system's 
stdlib.
+       ifeq ($(LDC), clang)
+               LDFLAGS += -nostdlib++ -nostdinc++
----------------
Michael137 wrote:

Just thought about this again and I think I understand where my confusion comes 
from. $(LD) here is always set to Clang. So the LDFLAGS are actually still 
flags to the clang driver, but just for the linking stage. So that's why adding 
it to the CXXFLAGS wasnt enough. I'll double check tomorrow. It still looks 
pike -lc++ is not something we want to add to LDFLAGS.

The reason this fixes your issue is that we wont add -lstdc++ (because that's 
the Clang driver behaviour for -nostdlib++)

https://github.com/llvm/llvm-project/pull/164462
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to