From fb321dfe34dc4f97657a3cac3e01ef3f91e0d439 Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Mon, 28 Mar 2022 18:03:24 +0100 Subject: [PATCH] [SYCL][CUDA] Don't link pi_cuda against libsycl The plugins are dynamically loaded and shouldn't be linked against libsycl. In this case it meant that a build of libsycl with the CUDA plugin enabled was unusable on a system where CUDA isn't installed, even when using other plugins or the host device. When the plugins are dynamically loaded, if some dependencies are missing the plugins will just be skipped instead of crashing the application. --- sycl/source/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/sycl/source/CMakeLists.txt b/sycl/source/CMakeLists.txt index b89835c5f4864..5f23d77b1126a 100644 --- a/sycl/source/CMakeLists.txt +++ b/sycl/source/CMakeLists.txt @@ -98,8 +98,6 @@ function(add_sycl_rt_library LIB_NAME) OpenCL-ICD ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} - PUBLIC - $<$:pi_cuda> ) add_common_options(${LIB_NAME} ${LIB_OBJ_NAME})