diff --git a/sycl/include/CL/sycl/detail/export.hpp b/sycl/include/CL/sycl/detail/export.hpp index 68b15af73456a..47d21bd894f0a 100644 --- a/sycl/include/CL/sycl/detail/export.hpp +++ b/sycl/include/CL/sycl/detail/export.hpp @@ -8,7 +8,7 @@ #pragma once -#ifndef SYCL_DEVICE_ONLY +#ifndef __SYCL_DEVICE_ONLY__ #ifndef __SYCL_EXPORT #ifdef _WIN32 @@ -25,14 +25,19 @@ #else #define __SYCL_EXPORT __declspec(dllimport) #define __SYCL_EXPORT_DEPRECATED(x) __declspec(dllimport, deprecated(x)) -#endif -#else +#endif //__SYCL_BUILD_SYCL_DLL +#else // _WIN32 #define DLL_LOCAL __attribute__((visibility("hidden"))) #define __SYCL_EXPORT __attribute__((visibility("default"))) #define __SYCL_EXPORT_DEPRECATED(x) \ __attribute__((visibility("default"), deprecated(x))) +#endif // _WIN32 +#endif // __SYCL_EXPORT +#else +#ifndef __SYCL_EXPORT +#define __SYCL_EXPORT +#define __SYCL_EXPORT_DEPRECATED(x) #endif -#endif -#endif +#endif // __SYCL_DEVICE_ONLY__ diff --git a/sycl/include/CL/sycl/detail/image_ocl_types.hpp b/sycl/include/CL/sycl/detail/image_ocl_types.hpp index bd569523da2a5..2dd20bf60e412 100644 --- a/sycl/include/CL/sycl/detail/image_ocl_types.hpp +++ b/sycl/include/CL/sycl/detail/image_ocl_types.hpp @@ -185,7 +185,7 @@ struct opencl_image_type; // Creation of dummy ocl types for host_image targets. // These dummy ocl types are needed by the compiler parser for the compilation -// of host application code with SYCL_DEVICE_ONLY macro set. +// of host application code with __SYCL_DEVICE_ONLY__ macro set. template struct opencl_image_type { using type =