[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
Wed Apr 26 00:48:33 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL301387: [test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is on (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D32489?vs=96564&id=96678#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32489

Files:
  compiler-rt/trunk/test/CMakeLists.txt


Index: compiler-rt/trunk/test/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/test/CMakeLists.txt
+++ compiler-rt/trunk/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.96678.patch
Type: text/x-patch
Size: 2551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170426/0eb65978/attachment.bin>


More information about the cfe-commits mailing list