Skip to content

Commit 6821e66

Browse files
authored
[SYCL][CUDA] Don't link pi_cuda against libsycl (#5908)
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.
1 parent dba0894 commit 6821e66

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sycl/source/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ function(add_sycl_rt_library LIB_NAME)
9898
OpenCL-ICD
9999
${CMAKE_DL_LIBS}
100100
${CMAKE_THREAD_LIBS_INIT}
101-
PUBLIC
102-
$<$<BOOL:${SYCL_BUILD_PI_CUDA}>:pi_cuda>
103101
)
104102

105103
add_common_options(${LIB_NAME} ${LIB_OBJ_NAME})

0 commit comments

Comments
 (0)