Skip to content

Commit 25527e1

Browse files
[SYCL] Use inline guarded by _WIN32 for has_extension
I'm only able reproduce link error downstream for this API (and don't know what exactly is causing it), but the change is the same in nature as parts of intel#16178, intel#16194 and intel#16267
1 parent 746a2bd commit 25527e1

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

sycl/source/backend/opencl.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,24 @@ __SYCL_EXPORT bool has_extension(const sycl::device &SyclDevice,
9292
} // namespace detail
9393

9494
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
95-
__SYCL_EXPORT bool has_extension(const sycl::device &SyclDevice,
96-
const std::string &Extension) {
95+
// Magic combination found by trial and error:
96+
__SYCL_EXPORT
97+
#if _WIN32
98+
inline
99+
#endif
100+
bool
101+
has_extension(const sycl::device &SyclDevice,
102+
const std::string &Extension) {
97103
return detail::has_extension(SyclDevice, detail::string_view{Extension});
98104
}
99-
__SYCL_EXPORT bool has_extension(const sycl::platform &SyclPlatform,
100-
const std::string &Extension) {
105+
// Magic combination found by trial and error:
106+
__SYCL_EXPORT
107+
#if _WIN32
108+
inline
109+
#endif
110+
bool
111+
has_extension(const sycl::platform &SyclPlatform,
112+
const std::string &Extension) {
101113
return detail::has_extension(SyclPlatform, detail::string_view{Extension});
102114
}
103115
#endif

0 commit comments

Comments
 (0)