[PATCH] D32489: [compiler-rt] [test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is on
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 25 08:00:47 PDT 2017
mgorny created this revision.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D32489
Files:
test/CMakeLists.txt
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -41,47 +41,49 @@
if(COMPILER_RT_BUILD_BUILTINS)
add_subdirectory(builtins)
endif()
- 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)
+ 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_XRAY)
+ if(COMPILER_RT_BUILD_XRAY AND COMPILER_RT_HAS_XRAY)
add_subdirectory(xray)
endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32489.96564.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170425/785dfca7/attachment.bin>
More information about the cfe-commits
mailing list