[Lldb-commits] [lldb] 95e0847 - [lldb] Check both the result and output of sysctl (#186462)

via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 13 10:29:07 PDT 2026


Author: Jonas Devlieghere
Date: 2026-03-13T17:29:02Z
New Revision: 95e084712f40ed8620bdd0e6428448f8825f6017

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

LOG: [lldb] Check both the result and output of sysctl (#186462)

This tightens the sysctl checks to check both the command result and the
output.

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBConfig.cmake
    lldb/tools/debugserver/source/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 291f189c2bee8..01738b29c7d8b 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -173,7 +173,7 @@ if (APPLE)
       RESULT_VARIABLE SYSCTL_RESULT
       OUTPUT_STRIP_TRAILING_WHITESPACE
   )
-  if(SYSCTL_RESULT EQUAL 0)
+  if(SYSCTL_RESULT EQUAL 0 AND SYSCTL_OUTPUT STREQUAL "1")
     set(default_enable_mte ON)
   endif()
 

diff  --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index 571313fa92cde..3c1ddf84fc21e 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -122,7 +122,7 @@ if (BUILDING_FOR_ARM64_OSX)
         RESULT_VARIABLE SYSCTL_RESULT
         OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-    if(SYSCTL_RESULT EQUAL 0)
+    if(SYSCTL_RESULT EQUAL 0 AND SYSCTL_OUTPUT STREQUAL "1")
       set(default_arm64e_debugserver ON)
     endif()
   endif()


        


More information about the lldb-commits mailing list