summaryrefslogtreecommitdiff
path: root/absl/base/internal/thread_identity.cc
diff options
context:
space:
mode:
authorGravatar Derek Mauro <761129+derekmauro@users.noreply.github.com>2021-06-01 10:52:49 -0400
committerGravatar GitHub <noreply@github.com>2021-06-01 10:52:49 -0400
commit278e0a071885a22dcd2fd1b5576cc44757299343 (patch)
tree2f50d910df44a77d0ace291ce84e13c9fbdc0162 /absl/base/internal/thread_identity.cc
parente1d388e7e74803050423d035e4374131b9b57919 (diff)
Abseil LTS 20210324, Patch 220210324.2
* Fixes build with glibc 2.34 (#952) * Fixes "illegal thread local variable" on some Apple platforms (#954, #965)
Diffstat (limited to 'absl/base/internal/thread_identity.cc')
-rw-r--r--absl/base/internal/thread_identity.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/absl/base/internal/thread_identity.cc b/absl/base/internal/thread_identity.cc
index 6ea010ed..9950e63a 100644
--- a/absl/base/internal/thread_identity.cc
+++ b/absl/base/internal/thread_identity.cc
@@ -120,10 +120,10 @@ void SetCurrentThreadIdentity(
ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_CPP11
// Please see the comment on `CurrentThreadIdentityIfPresent` in
-// thread_identity.h. Because DLLs cannot expose thread_local variables in
-// headers, we opt for the correct-but-slower option of placing the definition
-// of this function only in a translation unit inside DLL.
-#if defined(ABSL_BUILD_DLL) || defined(ABSL_CONSUME_DLL)
+// thread_identity.h. When we cannot expose thread_local variables in
+// headers, we opt for the correct-but-slower option of not inlining this
+// function.
+#ifndef ABSL_INTERNAL_INLINE_CURRENT_THREAD_IDENTITY_IF_PRESENT
ThreadIdentity* CurrentThreadIdentityIfPresent() { return thread_identity_ptr; }
#endif
#endif