@@ -434,6 +434,7 @@ if(APPLE)
434434 set (SANITIZER_COMMON_SUPPORTED_OS osx)
435435 set (PROFILE_SUPPORTED_OS osx)
436436 set (TSAN_SUPPORTED_OS osx)
437+ set (TYSAN_SUPPORTED_OS osx)
437438 set (XRAY_SUPPORTED_OS osx)
438439 set (FUZZER_SUPPORTED_OS osx)
439440 set (ORC_SUPPORTED_OS)
@@ -569,6 +570,7 @@ if(APPLE)
569570 list (APPEND FUZZER_SUPPORTED_OS ${platform} )
570571 list (APPEND ORC_SUPPORTED_OS ${platform} )
571572 list (APPEND UBSAN_SUPPORTED_OS ${platform} )
573+ list (APPEND TYSAN_SUPPORTED_OS ${platform} )
572574 list (APPEND LSAN_SUPPORTED_OS ${platform} )
573575 list (APPEND STATS_SUPPORTED_OS ${platform} )
574576 endif ()
@@ -624,6 +626,9 @@ if(APPLE)
624626 list_intersect(CTX_PROFILE_SUPPORTED_ARCH
625627 ALL_CTX_PROFILE_SUPPORTED_ARCH
626628 SANITIZER_COMMON_SUPPORTED_ARCH)
629+ list_intersect(TYSAN_SUPPORTED_ARCH
630+ ALL_TYSAN_SUPPORTED_ARCH
631+ SANITIZER_COMMON_SUPPORTED_ARCH)
627632 list_intersect(TSAN_SUPPORTED_ARCH
628633 ALL_TSAN_SUPPORTED_ARCH
629634 SANITIZER_COMMON_SUPPORTED_ARCH)
@@ -716,7 +721,7 @@ if(COMPILER_RT_SUPPORTED_ARCH)
716721endif ()
717722message (STATUS "Compiler-RT supported architectures: ${COMPILER_RT_SUPPORTED_ARCH} " )
718723
719- set (ALL_SANITIZERS asan;dfsan;msan;hwasan;tsan;safestack;cfi;scudo_standalone;ubsan_minimal;gwp_asan;nsan;asan_abi)
724+ set (ALL_SANITIZERS asan;dfsan;msan;hwasan;tsan;tysan; safestack;cfi;scudo_standalone;ubsan_minimal;gwp_asan;nsan;asan_abi)
720725set (COMPILER_RT_SANITIZERS_TO_BUILD all CACHE STRING
721726 "sanitizers to build if supported on the target (all;${ALL_SANITIZERS} )" )
722727list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS} " )
@@ -804,6 +809,13 @@ else()
804809 set (COMPILER_RT_HAS_CTX_PROFILE FALSE )
805810endif ()
806811
812+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND TYSAN_SUPPORTED_ARCH AND
813+ OS_NAME MATCHES "Linux|Darwin" )
814+ set (COMPILER_RT_HAS_TYSAN TRUE )
815+ else ()
816+ set (COMPILER_RT_HAS_TYSAN FALSE )
817+ endif ()
818+
807819if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH)
808820 if (OS_NAME MATCHES "Linux|Darwin|FreeBSD|NetBSD" )
809821 set (COMPILER_RT_HAS_TSAN TRUE )
0 commit comments