[Lldb-commits] [lldb] [LLDB][test] Update Makefile.rules to support Windows host+Linux target (PR #99266)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 17 05:14:56 PDT 2024


================
@@ -296,11 +313,13 @@ endif
 CFLAGS += $(CFLAGS_EXTRAS)
 CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
 LD = $(CC)
-LDFLAGS ?= $(CFLAGS)
+# Copy common options to the linker flags (dwarf, arch. & etc).
+#Note: we get some 'garbage' options for linker here (such as -I, --isystem & etc).
+LDFLAGS += $(CFLAGS)
 LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
 ifeq (,$(filter $(OS), Windows_NT Android Darwin))
 	ifneq (,$(filter YES,$(ENABLE_THREADS)))
-		LDFLAGS += -pthread
+		LDFLAGS += -lpthread
----------------
labath wrote:

My understanding was that `-pthread` is the recommended flag here. Why change it?

https://github.com/llvm/llvm-project/pull/99266


More information about the lldb-commits mailing list