We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1254b65 commit 2037f06Copy full SHA for 2037f06
libc/src/__support/macros/attributes.h
@@ -28,7 +28,9 @@
28
#define LIBC_INLINE_ASM __asm__ __volatile__
29
#define LIBC_UNUSED __attribute__((unused))
30
31
-#ifdef LIBC_TARGET_ARCH_IS_GPU
+// LIBC_THREAD_MODE is undefined when building libcxx. However, it is ok to just
32
+// use thread_local in a C++ context
33
+#if defined(LIBC_THREAD_MODE) && LIBC_THREAD_MODE == LIBC_THREAD_MODE_SINGLE
34
#define LIBC_THREAD_LOCAL
35
#else
36
#define LIBC_THREAD_LOCAL thread_local
0 commit comments