[compiler-rt] 6b84537 - [rtsan] Re-enable rtsan tests (#98219)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 16:06:43 PDT 2024


Author: Vitaly Buka
Date: 2024-07-09T16:06:39-07:00
New Revision: 6b8453732b9129299170f7c3ef574ff219790fc5

URL: https://github.com/llvm/llvm-project/commit/6b8453732b9129299170f7c3ef574ff219790fc5
DIFF: https://github.com/llvm/llvm-project/commit/6b8453732b9129299170f7c3ef574ff219790fc5.diff

LOG: [rtsan] Re-enable rtsan tests (#98219)

Follow up to #92460

DEPS llvm_gtest is not used by compiler-rt,
compiler-rt compiles them with COMPILER_RT_GOOGLETEST_SOURCES.

This reverts commit e217f98ac3ee55755ee6ea3b97551cf8283528c9.

Added: 
    

Modified: 
    compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    compiler-rt/cmake/config-ix.cmake
    compiler-rt/lib/rtsan/tests/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
index c8bec41db36e9..bc152e304aaaf 100644
--- a/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+++ b/compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
@@ -32,9 +32,9 @@ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${RISCV64}
     ${LOONGARCH64})
 set(ALL_ASAN_ABI_SUPPORTED_ARCH ${X86_64} ${ARM64} ${ARM64_32})
 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${LOONGARCH64})
-#set(ALL_RTSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${RISCV64}
-#    ${MIPS32} ${MIPS64} ${PPC64} ${S390X} ${SPARC} ${SPARCV9} ${HEXAGON}
-#    ${LOONGARCH64})
+set(ALL_RTSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${RISCV64}
+    ${MIPS32} ${MIPS64} ${PPC64} ${S390X} ${SPARC} ${SPARCV9} ${HEXAGON}
+    ${LOONGARCH64})
 
 if(ANDROID)
   set(OS_NAME "Android")

diff  --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 1130f9f721df4..c0bee77bfe70f 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -751,7 +751,8 @@ else()
   set(COMPILER_RT_HAS_ASAN FALSE)
 endif()
 
-if (COMPILER_RT_HAS_SANITIZER_COMMON AND RTSAN_SUPPORTED_ARCH)
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND RTSAN_SUPPORTED_ARCH AND
+    OS_NAME MATCHES "Android|Darwin|Linux")
   set(COMPILER_RT_HAS_RTSAN TRUE)
 else()
   set(COMPILER_RT_HAS_RTSAN FALSE)

diff  --git a/compiler-rt/lib/rtsan/tests/CMakeLists.txt b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
index d96e538b255f4..e539ebc387e0a 100644
--- a/compiler-rt/lib/rtsan/tests/CMakeLists.txt
+++ b/compiler-rt/lib/rtsan/tests/CMakeLists.txt
@@ -60,7 +60,7 @@ foreach(arch ${RTSAN_TEST_ARCH})
   #  RtsanUnitTests "Rtsan-${arch}-Test" ${arch}
   #  COMPILE_DEPS ${RTSAN_UNITTEST_HEADERS}
   #  SOURCES ${RTSAN_INST_TEST_SOURCES} ${COMPILER_RT_GOOGLETEST_SOURCES}
-  #  DEPS llvm_gtest rtsan
+  #  DEPS rtsan
   #  CFLAGS ${RTSAN_UNITTEST_CFLAGS} -fsanitize=realtime
   #  LINK_FLAGS ${RTSAN_UNITTEST_LINK_FLAGS} -fsanitize=realtime)
 
@@ -94,7 +94,6 @@ foreach(arch ${RTSAN_TEST_ARCH})
     COMPILE_DEPS ${RTSAN_UNITTEST_HEADERS}
     SOURCES ${RTSAN_NOINST_TEST_SOURCES}
             ${COMPILER_RT_GOOGLETEST_SOURCES}
-    DEPS llvm_gtest
     CFLAGS ${RTSAN_UNITTEST_CFLAGS}
     LINK_FLAGS ${RTSAN_UNITTEST_LINK_FLAGS}
     RUNTIME ${RTSAN_TEST_RUNTIME})


        


More information about the llvm-commits mailing list