Skip to content

Commit a1862d2

Browse files
[SYCL][ESIMD][EMU] __SYCL_EXPORT fix for 'getPlugin' (#3924)
- As 'getPlugin<>()' is exported, all instances of the function must be explicitly prefixed with '__SYCL_EXPORT'. - 'opencl' and 'level_zero' are changed for this export.
1 parent 4836390 commit a1862d2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sycl/source/detail/pi.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,8 @@ template <backend BE> const plugin &getPlugin() {
439439
PI_INVALID_OPERATION);
440440
}
441441

442-
template const plugin &getPlugin<backend::opencl>();
443-
template const plugin &getPlugin<backend::level_zero>();
444-
// __SYCL_EXPORT for esimd_cpu backend to use 'getPlugin' from
445-
// getPluginOpaqueData()
442+
template __SYCL_EXPORT const plugin &getPlugin<backend::opencl>();
443+
template __SYCL_EXPORT const plugin &getPlugin<backend::level_zero>();
446444
template __SYCL_EXPORT const plugin &getPlugin<backend::esimd_cpu>();
447445

448446
// Report error and no return (keeps compiler from printing warnings).

0 commit comments

Comments
 (0)