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
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)
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()
+
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()