[llvm] [SYCL] Add platform enumeration and info query using liboffload (PR #166927)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 02:26:02 PST 2025
================
@@ -117,10 +115,23 @@ add_custom_command(
install(DIRECTORY "${LIBSYCL_SOURCE_INCLUDE_DIR}/sycl" DESTINATION ${LIBSYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(DIRECTORY "${LIBSYCL_SOURCE_INCLUDE_DIR}/CL" DESTINATION ${LIBSYCL_INCLUDE_DIR} COMPONENT sycl-headers)
-set(LIBSYCL_RT_LIBS ${LIBSYCL_SHARED_OUTPUT_NAME})
-
-add_subdirectory(src)
+set(LIBSYCL_LIB_NAME "sycl")
+set(LIBSYCL_SHARED_OUTPUT_NAME "${LIBSYCL_LIB_NAME}")
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+ if (CMAKE_MSVC_RUNTIME_LIBRARY AND (NOT CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$"))
+ message(FATAL_ERROR "libsycl requires a DLL version of the MSVC CRT.")
+ endif()
+ if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
+ OR (CMAKE_MSVC_RUNTIME_LIBRARY STREQUAL "MultiThreadedDebugDLL"))
+ set(LIBSYCL_SHARED_OUTPUT_NAME "${LIBSYCL_SHARED_OUTPUT_NAME}d")
+ endif()
----------------
KseniyaTikhomirova wrote:
Hi Tom, these code is just moved from src/CMakeLists.txt one layer above. I think we have already discussed this strategy in "add libsycl" PR. We can reiterate that discussion but it is not a target for this PR.
https://github.com/llvm/llvm-project/pull/166927
More information about the llvm-commits
mailing list