diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index d16d718442397..f65a18f000940 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -221,6 +221,13 @@ add_custom_target( sycl-toolchain COMMENT "Building SYCL compiler toolchain..." ) +# Check if opencl-aot tool is enabled. +list(FIND LLVM_ENABLE_PROJECTS opencl-aot OPENCL_AOT_FOUND) +if(NOT OPENCL_AOT_FOUND EQUAL -1) + add_dependencies(sycl-toolchain opencl-aot) + list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS opencl-aot) +endif() + if (SYCL_ENABLE_XPTI_TRACING) add_dependencies( sycl-toolchain xpti) if (MSVC)