[Lldb-commits] [lldb] [lldb] Build debugserver fat for arm64 and arm64e (PR #186038)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 11 21:56:52 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Jonas Devlieghere (JDevlieghere)
<details>
<summary>Changes</summary>
Change the default of `LLDB_ENABLE_ARM64E_DEBUGSERVER` so we build debugserver fat for arm64 and arm64e when running on ptrauth-capable hardware. On older versions on macOS (before macOS 26 Tahoe) you need to set the `arm64e_preview_abi` boot arg to run the arm64e slice. However, building for it should be harmless.
---
Full diff: https://github.com/llvm/llvm-project/pull/186038.diff
1 Files Affected:
- (modified) lldb/tools/debugserver/source/CMakeLists.txt (+19-1)
``````````diff
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index a81fe5505cc35..8ae38ccf7cc0f 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -101,9 +101,27 @@ check_c_source_compiles(
BUILDING_FOR_ARM64_OSX
)
+set(default_arm64e_debugserver OFF)
+if (BUILDING_FOR_ARM64_OSX )
+ execute_process(
+ COMMAND sysctl -n hw.optional.ptrauth
+ OUTPUT_VARIABLE SYSCTL_OUTPUT
+ ERROR_QUIET
+ RESULT_VARIABLE SYSCTL_RESULT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(SYSCTL_RESULT EQUAL 0)
+ set(default_arm64e_debugserver ON)
+ endif()
+endif()
+option(LLDB_ENABLE_ARM64E_DEBUGSERVER "Build debugserver for arm64 and arm64e" ${default_arm64e_debugserver})
+
# You can only debug arm64e processes using an arm64e debugserver.
-option(LLDB_ENABLE_ARM64E_DEBUGSERVER "Build debugserver for arm64 and arm64e" OFF)
+# While on older versions of macOS, you may not be able to run arm64e binaries
+# without arm64e_preview_abi, building it should be harmless which is why we
+# default to ON on capable hardware.
if (BUILDING_FOR_ARM64_OSX AND LLDB_ENABLE_ARM64E_DEBUGSERVER)
+ message(STATUS "Building debugserver for arm64 and arm64e")
set(CMAKE_OSX_ARCHITECTURES "arm64;arm64e")
endif ()
``````````
</details>
https://github.com/llvm/llvm-project/pull/186038
More information about the lldb-commits
mailing list