================
@@ -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)
----------------
dzhidzhoev wrote:

Removed `-stdlib=libstdc++`. The problem was, that we were trying to link with 
in-tree libcxx not linked statically to libcxxabi, but clang driver couldn't 
use it without the explicit -lc++abi flag (it doesn't distinguish libcxx 
comilation types according to 
https://releases.llvm.org/6.0.0/projects/libcxx/docs/BuildingLibcxx.html#using-libcxxrt-on-linux).
Adding LIBCXX_ENABLE_STATIC_ABI_LIBRARY helps.

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