Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions sycl-jit/jit-compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,21 @@ else()
set(SYCL_JIT_VIRTUAL_TOOLCHAIN_ROOT "/sycl-jit-toolchain/")
endif()

set(SYCL_JIT_RESOURCE_INSTALL_COMPONENTS sycl-headers OpenCL-Headers clang-resource-headers)

if ("libclc" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND SYCL_JIT_RESOURCE_INSTALL_COMPONENTS libspirv-builtins)
if (NOT "libdevice" IN_LIST LLVM_ENABLE_PROJECTS)
message(FATAL_ERROR "libdevice is required for jit-compiler but not present in LLVM_ENABLE_PROJECTS")
endif()

if ("libdevice" IN_LIST LLVM_ENABLE_PROJECTS)
list(APPEND SYCL_JIT_RESOURCE_INSTALL_COMPONENTS libsycldevice)
set(SYCL_JIT_RESOURCE_INSTALL_COMPONENTS
sycl-headers
OpenCL-Headers
clang-resource-headers
libsycldevice)

if ("libclc" IN_LIST LLVM_ENABLE_PROJECTS)
# If some targets required `libclc` then we should embed it for the
# `sycl-jit`.
list(APPEND SYCL_JIT_RESOURCE_INSTALL_COMPONENTS libspirv-builtins)
endif()

set(SYCL_JIT_RESOURCE_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/rtc-resources-install)
Expand Down
Loading