[lldb] Default LLDB_ENABLE_MTE to OFF when Sanitizers are enabled. (#186884)
The MTE launcher complicates injecting the sanitizer runtime libraries.
This commit is contained in:
parent
013f2542a2
commit
9da068b7cf
@ -166,15 +166,19 @@ endif()
|
||||
if (APPLE)
|
||||
set(default_enable_mte OFF)
|
||||
|
||||
execute_process(
|
||||
COMMAND sysctl -n hw.optional.arm.FEAT_MTE4
|
||||
OUTPUT_VARIABLE SYSCTL_OUTPUT
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE SYSCTL_RESULT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(SYSCTL_RESULT EQUAL 0 AND SYSCTL_OUTPUT STREQUAL "1")
|
||||
set(default_enable_mte ON)
|
||||
# The MTE launcher complicates injecting the sanitizer runtime libraries.
|
||||
# Default to OFF when any sanitizer is enabled.
|
||||
if (NOT LLVM_USE_SANITIZER)
|
||||
execute_process(
|
||||
COMMAND sysctl -n hw.optional.arm.FEAT_MTE4
|
||||
OUTPUT_VARIABLE SYSCTL_OUTPUT
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE SYSCTL_RESULT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(SYSCTL_RESULT EQUAL 0 AND SYSCTL_OUTPUT STREQUAL "1")
|
||||
set(default_enable_mte ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(LLDB_ENABLE_MTE "Run the LLDB test suite with MTE enabled." ${default_enable_mte})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user