From 4133c18b1c8d6353b94a74f88384d1796dcee56c Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 29 Sep 2015 21:43:37 +0000 Subject: [PATCH] [CFI] Make CFI tests require UBSan (for diagnostic mode). CFI itself, on the other hand, doesn't require anything, including sanitizer_common. llvm-svn: 248830 --- compiler-rt/lib/CMakeLists.txt | 3 ++- compiler-rt/test/CMakeLists.txt | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt index fb5851aae876..9215b080b7b0 100644 --- a/compiler-rt/lib/CMakeLists.txt +++ b/compiler-rt/lib/CMakeLists.txt @@ -15,11 +15,12 @@ if(COMPILER_RT_BUILD_SANITIZERS) if(COMPILER_RT_HAS_SANITIZER_COMMON) add_subdirectory(sanitizer_common) - add_subdirectory(cfi) add_subdirectory(lsan) add_subdirectory(ubsan) endif() + add_subdirectory(cfi) + if(COMPILER_RT_HAS_ASAN) add_subdirectory(asan) endif() diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt index 6c898f476c80..684b409bb8f7 100644 --- a/compiler-rt/test/CMakeLists.txt +++ b/compiler-rt/test/CMakeLists.txt @@ -60,7 +60,10 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS) if(COMPILER_RT_HAS_UBSAN) add_subdirectory(ubsan) endif() - add_subdirectory(cfi) + # 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()