Skip to content

Commit

Permalink
thread_local support in MinGW seems to be buggy.
Browse files Browse the repository at this point in the history
Fixes #325.

Change-Id: I4d3a2bde514283e15ac2ab6928428ea59ab9b2f0
Reviewed-on: https://code-review.googlesource.com/c/re2/+/59230
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Aug 31, 2021
1 parent 7272283 commit 8e08f47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion re2/re2.h
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,11 @@ namespace hooks {
// thread_local, but for the sake of brevity, we lump together all versions
// of Apple platforms that aren't macOS. If an iOS application really needs
// the context pointee someday, we can get more specific then...
//
// As per https://github.com/google/re2/issues/325, thread_local support in
// MinGW seems to be buggy. (FWIW, Abseil folks also avoid it.)
#define RE2_HAVE_THREAD_LOCAL
#if defined(__APPLE__) && !TARGET_OS_OSX
#if (defined(__APPLE__) && !TARGET_OS_OSX) || defined(__MINGW32__)
#undef RE2_HAVE_THREAD_LOCAL
#endif

Expand Down

0 comments on commit 8e08f47

Please sign in to comment.