[Lldb-commits] [lldb] [lldb] Only run libc++ tests when the architecture matches (PR #204267)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 17 03:14:26 PDT 2026


================
@@ -814,6 +814,22 @@ def canRunLibcxxTests():
     if lldbplatformutil.platformIsDarwin():
         if not configuration.libcxx_include_dir or not configuration.libcxx_library_dir:
             return False, "libc++ tests require a locally built libc++"
+
+        # Check that the libc++ architecture matches the test architecture.
+        test_architecture = lldbplatformutil.getArchitecture()
+
+        libcxx_dylib_path = os.path.join(
+            configuration.libcxx_library_dir, "libc++.dylib"
+        )
+        try:
+            libcxx_arch_list = subprocess.check_output(
+                ["lipo", "-archs", libcxx_dylib_path], encoding="utf-8"
+            ).split(" ")
----------------
Teemperor wrote:

Doesn't this give us a list like `["arm64\n"]` which then wouldn't include `"arm64"` (without newline). I think this can be `split()`.

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


More information about the lldb-commits mailing list