Skip to content

Commit abc25d2

Browse files
ContradNamisebcopybara-github
authored andcommitted
PR #1915: Fix SYCL Build Compatibility with Intel LLVM Compiler on Windows for abseil
Imported from GitHub PR #1915 Add platform-specific thread-local storage definition for Intel's LLVM compiler when building with SYCL. The Intel LLVM compiler (icx) with SYCL enabled requires GCC-style thread-local storage (__thread) rather than Windows-specific __declspec(thread) when compiling for SYCL device code. This resolves the build error: "thread-local storage is not supported for the current target" when building with Intel oneAPI env on Windows systems. Merge 2596bc8 into e5266cd Merging this change closes #1915 COPYBARA_INTEGRATE_REVIEW=#1915 from ContradNamiseb:patch-1 2596bc8 PiperOrigin-RevId: 792213053 Change-Id: Ib53808f0c604749e00ae3da4c9070ab21e19c8d4
1 parent fde63b7 commit abc25d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

absl/base/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
237237
#error ABSL_HAVE_TLS cannot be directly set
238238
#elif (defined(__linux__)) && (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS))
239239
#define ABSL_HAVE_TLS 1
240+
#elif defined(__INTEL_LLVM_COMPILER)
241+
#define ABSL_HAVE_TLS 1
240242
#endif
241243

242244
// ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE

0 commit comments

Comments
 (0)