[Lldb-commits] [lldb] [LLDB][test] Update Makefile.rules to support Windows host+Linux target (PR #99266)
Vladislav Dzhidzhoev via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 09:51:21 PDT 2024
================
@@ -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:
> This still forces the usage of libstdc++ on windows, right? Could we just pass nothing here and let clang use its default?
Sorry, that was too early.
We still need this flag. It is ignored for Windows target, but clang tries to pass -lc++ to linker in case of Linux target if -lstdc++ is not specified, and ld.lld fails to find it (since it's not present in my sysroot).
https://github.com/llvm/llvm-project/pull/99266
More information about the lldb-commits
mailing list