Author: Jonas Devlieghere
Date: 2025-07-30T12:48:56-07:00
New Revision: a7ac43125eabb5845a2855bbf37fd4485831e860

URL: 
https://github.com/llvm/llvm-project/commit/a7ac43125eabb5845a2855bbf37fd4485831e860
DIFF: 
https://github.com/llvm/llvm-project/commit/a7ac43125eabb5845a2855bbf37fd4485831e860.diff

LOG: Re-land "[lldb] Pick the builder for the target platform (#151262)"

Pick the builder for the target platform, not the host platform. This is
necessary when running the test suite remotely on a different platform.
Unlike for Darwin, both Windows and Linux us the default builder, which
is why this went unnoticed on the remote-linux bots.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/builders/__init__.py
    lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
    lldb/packages/Python/lldbsuite/test/lldbtest.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/builders/__init__.py 
b/lldb/packages/Python/lldbsuite/test/builders/__init__.py
index 9dd82cb3ebccf..7331526e97896 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/__init__.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/__init__.py
@@ -8,7 +8,15 @@
 
 def get_builder(platform):
     """Returns a Builder instance for the given platform."""
-    if platform == "darwin":
+    if platform in [
+        "bridgeos",
+        "darwin",
+        "ios",
+        "macosx",
+        "tvos",
+        "watchos",
+        "xros",
+    ]:
         from .darwin import BuilderDarwin
 
         return BuilderDarwin()

diff  --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py 
b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index a1ab06076dcb2..cea6270695dc0 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -229,7 +229,8 @@ def hasChattyStderr(test_case):
 
 
 def builder_module():
-    return get_builder(sys.platform)
+    """Return the builder for the target platform."""
+    return get_builder(getPlatform())
 
 
 def getArchitecture():

diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py 
b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index a74961ec6fcc4..6eb021d7c8cfd 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1517,7 +1517,7 @@ def build(
         testname = self.getBuildDirBasename()
 
         module = builder_module()
-        command = builder_module().getBuildCommand(
+        command = module.getBuildCommand(
             debug_info,
             architecture,
             compiler,


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to