[Lldb-commits] [lldb] 182723f - [lldb] Add a decorator for arm64e (#186909)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 16 18:01:26 PDT 2026
Author: Jonas Devlieghere
Date: 2026-03-16T18:01:22-07:00
New Revision: 182723f1a3bae894259c7928604604287c7e6951
URL: https://github.com/llvm/llvm-project/commit/182723f1a3bae894259c7928604604287c7e6951
DIFF: https://github.com/llvm/llvm-project/commit/182723f1a3bae894259c7928604604287c7e6951.diff
LOG: [lldb] Add a decorator for arm64e (#186909)
Added:
Modified:
lldb/packages/Python/lldbsuite/test/decorators.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index dfb3557ebb6fb..cb3aa1d6af115 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -1304,3 +1304,33 @@ def skipIfBuildType(types: list[str]):
and configuration.cmake_build_type.lower() in types,
"skip on {} build type(s)".format(", ".join(types)),
)
+
+
+def skipUnlessArm64eSupported(func):
+ """Decorate the item to skip test unless Clang can target arm64e."""
+
+ def can_build_and_run_arm64e():
+ arch = lldbplatformutil.getArchitecture()
+
+ # We need to be running the test suite for arm64 or arm64e. If we're
+ # running the whole test suite as arm64e, we don't need any additional
+ # checks.
+ if arch == "arm64e":
+ return None
+ elif arch != "arm64":
+ return "Not targeting arm64"
+
+ # Need at least macOS Tahoe (26) to run arm64e binaries.
+ if platform.mac_ver()[0] == "" or _check_expected_version(
+ "<", "26.0", platform.mac_ver()[0]
+ ):
+ return "Host cannot run arm64e binaries"
+
+ # Need a compiler that can target arm64e.
+ compiler_path = lldbplatformutil.getCompiler()
+ if not _compiler_supports(compiler_path, "-arch arm64e"):
+ return "Compiler cannot target arm64e"
+
+ return None
+
+ return skipTestIfFn(can_build_and_run_arm64e)(func)
More information about the lldb-commits
mailing list