https://github.com/bulbazord updated https://github.com/llvm/llvm-project/pull/204267
>From c9b5e44161649107cb795a23aa21c0fc85c89cae Mon Sep 17 00:00:00 2001 From: Alex Langford <[email protected]> Date: Tue, 16 Jun 2026 16:37:35 -0700 Subject: [PATCH 1/2] [lldb] Only run libc++ tests when the architecture matches It does not make sense to run the libc++ tests when the libc++ dylib has an architecture that does not match the test binary. I ran into this when running the test suite with arm64e test binaries and the locally-built libc++ is built arm64. --- lldb/packages/Python/lldbsuite/test/dotest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index d2bcc98bde900..f6a92053f386a 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -832,6 +832,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(" ") + if test_architecture not in libcxx_arch_list: + return False, f"libc++ dylib missing {test_architecture} slice" + except subprocess.CalledProcessError: + return False, "libc++ dylib is not present" + return True, "libc++ present" if platform == "linux": >From c698f5699105126e0b164405a41f3b50e1718ace Mon Sep 17 00:00:00 2001 From: Alex Langford <[email protected]> Date: Wed, 17 Jun 2026 11:56:52 -0700 Subject: [PATCH 2/2] Raphael's feedback --- lldb/packages/Python/lldbsuite/test/dotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index f6a92053f386a..ee284bd817aa1 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -842,7 +842,7 @@ def canRunLibcxxTests(): try: libcxx_arch_list = subprocess.check_output( ["lipo", "-archs", libcxx_dylib_path], encoding="utf-8" - ).split(" ") + ).split() if test_architecture not in libcxx_arch_list: return False, f"libc++ dylib missing {test_architecture} slice" except subprocess.CalledProcessError: _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
