[llvm] [SYCL] Add libsycl, a SYCL RT library implementation project (PR #144372)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 04:36:40 PDT 2025
================
@@ -0,0 +1,111 @@
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes/cmake/Modules")
+include(WarningFlags)
+
+function(add_sycl_rt_library LIB_NAME LIB_OBJ_NAME)
+ if (NOT LLVM_ENABLE_PIC)
+ message( FATAL_ERROR "Position-Independent Code generation is required for libsycl shared library" )
+ endif()
+ # Add an optional argument so we can get the library name to
+ # link with for Windows Debug version
+ cmake_parse_arguments(ARG "" "IMPLIB_NAME" "COMPILE_OPTIONS;SOURCES" ${ARGN})
+
+ add_library(${LIB_OBJ_NAME} OBJECT ${ARG_SOURCES})
+
+ # Common compilation step setup
+ target_compile_definitions(${LIB_OBJ_NAME} PRIVATE $<$<BOOL:${MSVC}>:_LIBSYCL_BUILD_SYCL_DLL>)
----------------
KseniyaTikhomirova wrote:
will update
https://github.com/llvm/llvm-project/pull/144372
More information about the llvm-commits
mailing list