summaryrefslogtreecommitdiff
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt35
1 files changed, 31 insertions, 4 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 1a7215774..e5c51c8cd 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -36,9 +36,37 @@ endif()
# Run sanitizer tests only if we're sure that clang would produce
# working binaries.
if(COMPILER_RT_CAN_EXECUTE_TESTS)
- foreach(runtime ${COMPILER_RT_RUNTIMES_TO_BUILD})
- add_subdirectory(${runtime})
- endforeach()
+ if(COMPILER_RT_HAS_ASAN)
+ add_subdirectory(asan)
+ endif()
+ if(COMPILER_RT_HAS_DFSAN)
+ add_subdirectory(dfsan)
+ endif()
+ if(COMPILER_RT_HAS_LSAN)
+ add_subdirectory(lsan)
+ endif()
+ if(COMPILER_RT_HAS_MSAN)
+ add_subdirectory(msan)
+ endif()
+ if(COMPILER_RT_HAS_PROFILE)
+ add_subdirectory(profile)
+ endif()
+ if(COMPILER_RT_HAS_SANITIZER_COMMON)
+ add_subdirectory(sanitizer_common)
+ endif()
+ if(COMPILER_RT_HAS_TSAN)
+ add_subdirectory(tsan)
+ endif()
+ if(COMPILER_RT_HAS_UBSAN)
+ add_subdirectory(ubsan)
+ endif()
+ # CFI tests require diagnostic mode, which is implemented in UBSan.
+ if(COMPILER_RT_HAS_UBSAN)
+ add_subdirectory(cfi)
+ endif()
+ if(COMPILER_RT_HAS_SAFESTACK)
+ add_subdirectory(safestack)
+ endif()
endif()
if(COMPILER_RT_STANDALONE_BUILD)
@@ -51,4 +79,3 @@ if(COMPILER_RT_STANDALONE_BUILD)
${LLVM_LIT_TESTSUITES}
DEPENDS ${LLVM_LIT_DEPENDS})
endif()
-