forked from OSchip/llvm-project
[test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is on
Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray tests. This makes it possible to do a pure-builtins build with tests enabled. Differential Revision: https://reviews.llvm.org/D32489 llvm-svn: 301387
This commit is contained in:
parent
d9fb157845
commit
2bcd94f8d8
|
@ -41,47 +41,49 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
|
|||
if(COMPILER_RT_BUILD_BUILTINS)
|
||||
add_subdirectory(builtins)
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_ASAN)
|
||||
add_subdirectory(asan)
|
||||
if(COMPILER_RT_BUILD_SANITIZERS)
|
||||
if(COMPILER_RT_HAS_ASAN)
|
||||
add_subdirectory(asan)
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_DFSAN)
|
||||
add_subdirectory(dfsan)
|
||||
endif()
|
||||
if (COMPILER_RT_HAS_INTERCEPTION)
|
||||
add_subdirectory(interception)
|
||||
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()
|
||||
if(COMPILER_RT_HAS_ESAN)
|
||||
add_subdirectory(esan)
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_SCUDO)
|
||||
add_subdirectory(scudo)
|
||||
endif()
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_DFSAN)
|
||||
add_subdirectory(dfsan)
|
||||
endif()
|
||||
if (COMPILER_RT_HAS_INTERCEPTION)
|
||||
add_subdirectory(interception)
|
||||
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()
|
||||
if(COMPILER_RT_HAS_ESAN)
|
||||
add_subdirectory(esan)
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_SCUDO)
|
||||
add_subdirectory(scudo)
|
||||
endif()
|
||||
if(COMPILER_RT_HAS_XRAY)
|
||||
if(COMPILER_RT_BUILD_XRAY AND COMPILER_RT_HAS_XRAY)
|
||||
add_subdirectory(xray)
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue