File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,26 @@ add_library(pi_esimd_cpu SHARED
11
11
"pi_esimd_cpu.cpp"
12
12
)
13
13
14
+ if (MSVC )
15
+ # by defining __SYCL_BUILD_SYCL_DLL, we can use __declspec(dllexport)
16
+ # which are individually tagged for all pi* symbols in pi.h
17
+ target_compile_definitions (pi_esimd_cpu PRIVATE __SYCL_BUILD_SYCL_DLL )
18
+ else ()
19
+ # we set the visibility of all symbols 'hidden' by default.
20
+ # In pi.h file, we set exported symbols with visibility==default individually
21
+ target_compile_options (pi_esimd_cpu PUBLIC -fvisibility=hidden )
22
+
23
+ # This script file is used to allow exporting pi* symbols only.
24
+ # All other symbols are regarded as local (hidden)
25
+ set (linker_script "${CMAKE_CURRENT_SOURCE_DIR} /../ld-version-script.txt" )
26
+
27
+ # Filter symbols based on the scope defined in the script file,
28
+ # and export pi* function symbols in the library.
29
+ target_link_libraries ( pi_esimd_cpu
30
+ PRIVATE "-Wl,--version-script=${linker_script} "
31
+ )
32
+ endif ()
33
+
14
34
add_dependencies (sycl-toolchain pi_esimd_cpu )
15
35
16
36
add_dependencies (pi_esimd_cpu
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ void *getPluginOpaqueData(void *OpaqueDataParam) {
65
65
return ReturnOpaqueData;
66
66
}
67
67
68
- template void *getPluginOpaqueData<cl::sycl::backend::esimd_cpu>(void *);
68
+ template __SYCL_EXPORT void *getPluginOpaqueData<cl::sycl::backend::esimd_cpu>(void *);
69
69
70
70
namespace pi {
71
71
@@ -438,9 +438,9 @@ template <backend BE> const plugin &getPlugin() {
438
438
PI_INVALID_OPERATION);
439
439
}
440
440
441
- template const plugin &getPlugin<backend::opencl>();
442
- template const plugin &getPlugin<backend::level_zero>();
443
- template const plugin &getPlugin<backend::esimd_cpu>();
441
+ template __SYCL_EXPORT const plugin &getPlugin<backend::opencl>();
442
+ template __SYCL_EXPORT const plugin &getPlugin<backend::level_zero>();
443
+ template __SYCL_EXPORT const plugin &getPlugin<backend::esimd_cpu>();
444
444
445
445
// Report error and no return (keeps compiler from printing warnings).
446
446
// TODO: Probably change that to throw a catchable exception,
Original file line number Diff line number Diff line change @@ -3790,6 +3790,7 @@ _ZN2cl4sycl6detail18stringifyErrorCodeEi
3790
3790
_ZN2cl4sycl6detail19convertChannelOrderE23_pi_image_channel_order
3791
3791
_ZN2cl4sycl6detail19convertChannelOrderENS0_19image_channel_orderE
3792
3792
_ZN2cl4sycl6detail19getImageElementSizeEhNS0_18image_channel_typeE
3793
+ _ZN2cl4sycl6detail19getPluginOpaqueDataILNS0_7backendE4EEEPvS4_
3793
3794
_ZN2cl4sycl6detail19kernel_bundle_plain32set_specialization_constant_implEPKcPvm
3794
3795
_ZN2cl4sycl6detail20associateWithHandlerERNS0_7handlerEPNS1_16AccessorBaseHostENS0_6access6targetE
3795
3796
_ZN2cl4sycl6detail20getDeviceFromHandlerERNS0_7handlerE
@@ -3807,6 +3808,9 @@ _ZN2cl4sycl6detail28getPixelCoordNearestFiltModeENS0_3vecIfLi4EEENS0_15addressin
3807
3808
_ZN2cl4sycl6detail2pi25contextSetExtendedDeleterERKNS0_7contextEPFvPvES6_
3808
3809
_ZN2cl4sycl6detail2pi3dieEPKc
3809
3810
_ZN2cl4sycl6detail2pi9assertionEbPKc
3811
+ _ZN2cl4sycl6detail2pi9getPluginILNS0_7backendE1EEERKNS1_6pluginEv
3812
+ _ZN2cl4sycl6detail2pi9getPluginILNS0_7backendE2EEERKNS1_6pluginEv
3813
+ _ZN2cl4sycl6detail2pi9getPluginILNS0_7backendE4EEERKNS1_6pluginEv
3810
3814
_ZN2cl4sycl6detail6OSUtil10getDirNameB5cxx11EPKc
3811
3815
_ZN2cl4sycl6detail6OSUtil11alignedFreeEPv
3812
3816
_ZN2cl4sycl6detail6OSUtil12alignedAllocEmm
You can’t perform that action at this time.
0 commit comments