Skip to content

Commit 4ff2f60

Browse files
committed
[test][LSAN] Check if HWASAN is availibe before testing
OSX fails to compiler with -fsanitize=hwaddress. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1486833
1 parent 56f7c7e commit 4ff2f60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/test/lsan/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ foreach(arch ${LSAN_TEST_ARCH})
2121
list(APPEND LSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
2222

2323
list(FIND ASAN_SUPPORTED_ARCH ${arch} _found)
24-
if(NOT _found EQUAL -1)
24+
if(NOT _found EQUAL -1 AND COMPILER_RT_HAS_ASAN)
2525
set(CONFIG_NAME ${ARCH_UPPER_CASE}AsanConfig)
2626
set(LSAN_LIT_TEST_MODE "AddressSanitizer")
2727
configure_lit_site_cfg(
@@ -31,7 +31,7 @@ foreach(arch ${LSAN_TEST_ARCH})
3131
endif()
3232

3333
list(FIND HWASAN_SUPPORTED_ARCH ${arch} _found)
34-
if(NOT _found EQUAL -1)
34+
if(NOT _found EQUAL -1 AND COMPILER_RT_HAS_HWASAN)
3535
set(CONFIG_NAME ${ARCH_UPPER_CASE}HWAsanConfig)
3636
set(LSAN_LIT_TEST_MODE "HWAddressSanitizer")
3737
configure_lit_site_cfg(

0 commit comments

Comments
 (0)