[llvm] [SYCL] Add platform enumeration and info query using liboffload (PR #166927)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 06:37:04 PST 2025


================
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains macro definitions used in SYCL implementation.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL___IMPL_DETAIL_MACRO_DEFINITIONS_HPP
+#define _LIBSYCL___IMPL_DETAIL_MACRO_DEFINITIONS_HPP
+
+#ifndef __SYCL2020_DEPRECATED
+#  if SYCL_LANGUAGE_VERSION == 202012L &&                                      \
+      !defined(SYCL2020_DISABLE_DEPRECATION_WARNINGS)
+#    define __SYCL2020_DEPRECATED(message) [[deprecated(message)]]
+#  else
+#    define __SYCL2020_DEPRECATED(message)
+#  endif
+#endif // __SYCL2020_DEPRECATED
+
+static_assert(__cplusplus >= 201703L,
+              "SYCL RT does not support C++ version earlier than C++17.");
+
+#if defined(_WIN32) && !defined(_DLL) && !defined(__SYCL_DEVICE_ONLY__)
+// SYCL library is designed such a way that STL objects cross DLL boundary,
+// which is guaranteed to work properly only when the application uses the same
+// C++ runtime that SYCL library uses.
+// The appplications using sycl.dll must be linked with dynamic/release C++ MSVC
+// runtime, i.e. be compiled with /MD switch. Similarly, the applications using
+// sycld.dll must be linked with dynamic/debug C++ runtime and be compiled with
+// /MDd switch.
----------------
KseniyaTikhomirova wrote:

https://github.com/llvm/llvm-project/pull/166927/changes/9ce769553bcebd83c0a8327e5c5390d22d7844d0

https://github.com/llvm/llvm-project/pull/166927


More information about the llvm-commits mailing list