Skip to content

[SYCL] Align linkage in windows build. #1929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions sycl/include/CL/sycl/backend/opencl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ namespace opencl {
// Note that they take opaque pi_native_handle that real OpenCL handles
// are casted to.
//
platform make_platform(pi_native_handle NativeHandle);
device make_device(pi_native_handle NativeHandle);
context make_context(pi_native_handle NativeHandle);
program make_program(const context &Context, pi_native_handle NativeHandle);
queue make_queue(const context &Context, pi_native_handle InteropHandle);
__SYCL_EXPORT platform make_platform(pi_native_handle NativeHandle);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes compilation failure for windows, which resulted in error C2375: 'cl::sycl::opencl::make_platform': redefinition; different linkage.

__SYCL_EXPORT device make_device(pi_native_handle NativeHandle);
__SYCL_EXPORT context make_context(pi_native_handle NativeHandle);
__SYCL_EXPORT program make_program(const context &Context,
pi_native_handle NativeHandle);
__SYCL_EXPORT queue make_queue(const context &Context,
pi_native_handle InteropHandle);

// Construction of SYCL platform.
template <typename T, typename std::enable_if<
Expand Down