[llvm] [SYCL] Add libsycl, a SYCL RT library implementation project (PR #144372)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 09:11:51 PDT 2025


================
@@ -0,0 +1,59 @@
+//===----------------------------------------------------------------------===//
+//
+// 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 the declaration of the macros defining attributes for
+/// exported methods and defining API namespaces.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBSYCL_DETAIL_CONFIG_HPP
+#define _LIBSYCL_DETAIL_CONFIG_HPP
+
+#include <sycl/version.hpp>
+
+#define _LIBSYCL_BEGIN_UNVERSIONED_NAMESPACE_SYCL namespace sycl {
+#define _LIBSYCL_END_UNVERSIONED_NAMESPACE_SYCL }
+
+#define _LIBSYCL_BEGIN_NAMESPACE_SYCL                                          \
+  _LIBSYCL_BEGIN_UNVERSIONED_NAMESPACE_SYCL inline namespace _LIBSYCL_ABI_NAMESPACE {
+#define _LIBSYCL_END_NAMESPACE_SYCL                                            \
+  }                                                                            \
+  _LIBSYCL_END_UNVERSIONED_NAMESPACE_SYCL
+
+#ifndef __SYCL_DEVICE_ONLY__
+
+#  ifndef _LIBSYCL_EXPORT
+#    ifdef _WIN32
+
+#      define _LIBSYCL_DLL_LOCAL
+
+#      if _LIBSYCL_BUILD_SYCL_DLL
+#        define _LIBSYCL_EXPORT __declspec(dllexport)
+#      else
+#        define _LIBSYCL_EXPORT __declspec(dllimport)
+#      endif //_LIBSYCL_BUILD_SYCL_DLL
+
+#    else // _WIN32
+
+#      define _LIBSYCL_DLL_LOCAL [[gnu::visibility("hidden")]]
----------------
KseniyaTikhomirova wrote:

updated https://github.com/llvm/llvm-project/pull/144372/commits/2caf523093e0c16b22a0af8c680ca2835504557e

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


More information about the llvm-commits mailing list