[xray] Only build xray on Linux for now
authorReid Kleckner <rnk@google.com>
Wed, 20 Jul 2016 14:58:07 +0000 (14:58 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 20 Jul 2016 14:58:07 +0000 (14:58 +0000)
Should fix the Windows buildbots, and maybe some other non-Linux Unix
bots too.

XRay currently depends on sanitizer_common, so associate it with the
"build sanitizers" option and remove the option for separately
controlling the XRay build.

llvm-svn: 276124

compiler-rt/CMakeLists.txt
compiler-rt/cmake/config-ix.cmake
compiler-rt/lib/CMakeLists.txt

index 2f61d15..a067581 100644 (file)
@@ -37,8 +37,6 @@ option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON)
 mark_as_advanced(COMPILER_RT_BUILD_BUILTINS)
 option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
 mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
-option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
-mark_as_advanced(COMPILER_RT_BUILD_XRAY)
 
 if (COMPILER_RT_STANDALONE_BUILD)
   if (NOT LLVM_CONFIG_PATH)
index d273d64..824f5fc 100644 (file)
@@ -498,3 +498,10 @@ else()
   set(COMPILER_RT_HAS_SCUDO FALSE)
 endif()
 
+if (COMPILER_RT_HAS_SANITIZER_COMMON AND XRAY_SUPPORTED_ARCH AND
+    OS_NAME MATCHES "Linux")
+  set(COMPILER_RT_HAS_XRAY TRUE)
+else()
+  set(COMPILER_RT_HAS_XRAY FALSE)
+endif()
+
index 61c56f5..1abc6a7 100644 (file)
@@ -56,8 +56,8 @@ if(COMPILER_RT_BUILD_SANITIZERS)
   if(COMPILER_RT_HAS_SCUDO)
     add_subdirectory(scudo)
   endif()
-endif()
 
-if(COMPILER_RT_BUILD_XRAY)
-  add_subdirectory(xray)
+  if(COMPILER_RT_HAS_XRAY)
+    add_subdirectory(xray)
+  endif()
 endif()