[Bf-blender-cvs] [157ff516b67] cycles_oneapi: Build: add $ORIGIN to cycles_kernel_oneapi.so rpath
Xavier Hallade
noreply at git.blender.org
Tue May 31 20:56:50 CEST 2022
Commit: 157ff516b6761a6eb56bcb7c1ec1c2639b5c3674
Author: Xavier Hallade
Date: Tue May 31 20:54:02 2022 +0200
Branches: cycles_oneapi
https://developer.blender.org/rB157ff516b6761a6eb56bcb7c1ec1c2639b5c3674
Build: add $ORIGIN to cycles_kernel_oneapi.so rpath
this allows cycles_kernel_oneapi.so to load libsycl.so from its
same install directory.
===================================================================
M intern/cycles/kernel/CMakeLists.txt
===================================================================
diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt
index 21999459011..a9adc3583dd 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -840,6 +840,11 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
endif()
else()
list(APPEND sycl_compiler_flags -fPIC)
+
+ # add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
+ # libpi_level_zero.so can be placed next to it and get found.
+ list(APPEND sycl_compiler_flags -Wl,-rpath,'$$ORIGIN')
+
# The oneAPI distribution calls the compiler "dpcpp" and comes with a script that sets environment variables.
if(sycl_compiler_compiler_name MATCHES "dpcpp")
add_custom_command(
More information about the Bf-blender-cvs
mailing list