[Lldb-commits] [lldb] [lldb] Support Darwin cross compilation for remote Linux test suite runs (PR #151403)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 30 17:54:06 PDT 2025


================
@@ -355,6 +355,16 @@ ifeq "$(OS)" "Windows_NT"
 	endif
 endif
 
+#----------------------------------------------------------------------
+# Darwin cross compilation
+#----------------------------------------------------------------------
+ifeq "$(HOST_OS)" "Darwin"
+        ifneq "$(HOST_OS)" "$(OS)"
+                LDFLAGS += -fuse-ld=lld
----------------
jasonmolenda wrote:

I think the failure mode is that you try to run tests (on a mac, targeting a non-mac), we will try to link the test binaries with lld, which will fail immediately.  Someone who doesn't know would (I think) say "Oh, I guess I need lld to build binaries for this remote target" when every test fails the same way.

Is this going to work if I run the lldb testsuite on a macOS system but running the tests on iOS or other Darwin type OS.  Looking through existing OS comparisons in Makefile.rules, it seems like it can be Darwin/Android/Windows_NT/FreeBSD/NetBSD (plus I'm sure Linux).  So probably it calls an iOS device Darwin too.

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


More information about the lldb-commits mailing list