Commit: 0893e29a1513e42fb636ff278de123193307cf3d
Author: Xavier Hallade
Date:   Fri May 13 17:01:42 2022 +0200
Branches: cycles_oneapi
https://developer.blender.org/rB0893e29a1513e42fb636ff278de123193307cf3d

Cycles: detect sycl library ABI to keep backend compatible

===================================================================

M       intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/kernel/CMakeLists.txt 
b/intern/cycles/kernel/CMakeLists.txt
index a8ee9f301af..f4f0856aaf8 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -759,6 +759,16 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
   get_filename_component(sycl_compiler_root ${SYCL_COMPILER} DIRECTORY)
   get_filename_component(sycl_compiler_compiler_name ${SYCL_COMPILER} NAME_WE)
 
+  if(UNIX AND NOT APPLE)
+    if(NOT WITH_CXX11_ABI)
+      check_library_exists(sycl
+        _ZN2cl4sycl7handler22verifyUsedKernelBundleERKSs 
${sycl_compiler_root}/../lib SYCL_NO_CXX11_ABI)
+      if(SYCL_NO_CXX11_ABI)
+        list(APPEND sycl_compiler_flags -D_GLIBCXX_USE_CXX11_ABI=0)
+      endif()
+    endif()
+  endif()
+
   if(WIN32)
     list(APPEND sycl_compiler_flags
     -fms-extensions

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to