diff --git a/libdevice/cmake/modules/SYCLLibdevice.cmake b/libdevice/cmake/modules/SYCLLibdevice.cmake index 080e2e575e540..e2fd70a6226b5 100644 --- a/libdevice/cmake/modules/SYCLLibdevice.cmake +++ b/libdevice/cmake/modules/SYCLLibdevice.cmake @@ -32,6 +32,12 @@ set(compile_opts -sycl-std=2020 ) +set(SYCL_LIBDEVICE_GCC_TOOLCHAIN "" CACHE PATH "Path to GCC installation") + +if (NOT SYCL_LIBDEVICE_GCC_TOOLCHAIN STREQUAL "") + list(APPEND compile_opts "--gcc-toolchain=${SYCL_LIBDEVICE_GCC_TOOLCHAIN}") +endif() + if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD) string(APPEND sycl_targets_opt ",nvptx64-nvidia-cuda") list(APPEND compile_opts