[llvm] [SYCL] Add libsycl, a SYCL RT library implementation project (PR #144372)
Tom Honermann via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 29 20:50:23 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
----------------
tahonermann wrote:
I think this should be `#ifdef`. libc++ uses `_LIBCPP_BUILDING_LIBRARY` as its name for this macro; I suggest following suit.
```suggestion
# ifdef _LIBSYCL_BUILDING_LIBRARY
```
https://github.com/llvm/llvm-project/pull/144372
More information about the llvm-commits
mailing list