Skip to content

Commit

Permalink
[test][LSAN] Check if HWASAN is availibe before testing
Browse files Browse the repository at this point in the history
OSX fails to compiler with -fsanitize=hwaddress.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1486833
  • Loading branch information
vitalybuka committed Sep 27, 2023
1 parent 56f7c7e commit 4ff2f60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/test/lsan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ foreach(arch ${LSAN_TEST_ARCH})
list(APPEND LSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})

list(FIND ASAN_SUPPORTED_ARCH ${arch} _found)
if(NOT _found EQUAL -1)
if(NOT _found EQUAL -1 AND COMPILER_RT_HAS_ASAN)
set(CONFIG_NAME ${ARCH_UPPER_CASE}AsanConfig)
set(LSAN_LIT_TEST_MODE "AddressSanitizer")
configure_lit_site_cfg(
Expand All @@ -31,7 +31,7 @@ foreach(arch ${LSAN_TEST_ARCH})
endif()

list(FIND HWASAN_SUPPORTED_ARCH ${arch} _found)
if(NOT _found EQUAL -1)
if(NOT _found EQUAL -1 AND COMPILER_RT_HAS_HWASAN)
set(CONFIG_NAME ${ARCH_UPPER_CASE}HWAsanConfig)
set(LSAN_LIT_TEST_MODE "HWAddressSanitizer")
configure_lit_site_cfg(
Expand Down

0 comments on commit 4ff2f60

Please sign in to comment.