Rebased onto chromium third_party cd3dd0a61f8. Drops the ABSL_HAVE_THREAD_SANITIZER and ABSL_HAVE_LEAK_SANITIZER disables, which the preceding system-header change makes unnecessary; the -Wsign-compare suppression, which protobuf v36 no longer needs; and the android api < 17 SYS_mmap2 patch, replaced by the next commit. Consolidates the remaining eleven local patches into six. Differential Revision: https://phabricator.services.mozilla.com/D322121
102 lines
4.3 KiB
Diff
102 lines
4.3 KiB
Diff
From: Ryan VanderMeulen <rvandermeulen@mozilla.com>
|
|
Date: Sun, 23 Aug 2026 13:55:28 -0400
|
|
Subject: Bug 2038068 - make abseil-cpp use the Win32 path on mingw.
|
|
|
|
---
|
|
abseil-cpp/absl/base/internal/thread_identity.cc | 8 ++++----
|
|
abseil-cpp/absl/base/internal/thread_identity.h | 2 +-
|
|
abseil-cpp/absl/synchronization/internal/pthread_waiter.h | 4 ++--
|
|
abseil-cpp/absl/synchronization/internal/win32_waiter.h | 4 ++--
|
|
4 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/abseil-cpp/absl/base/internal/thread_identity.cc b/abseil-cpp/absl/base/internal/thread_identity.cc
|
|
index 27b5816394a..07352dee4e9 100644
|
|
--- a/abseil-cpp/absl/base/internal/thread_identity.cc
|
|
+++ b/abseil-cpp/absl/base/internal/thread_identity.cc
|
|
@@ -23,7 +23,7 @@
|
|
#include "absl/base/internal/raw_logging.h"
|
|
#include "absl/base/internal/spinlock.h"
|
|
|
|
-#if !defined(_WIN32) || defined(__MINGW32__)
|
|
+#if !defined(_WIN32)
|
|
#include <pthread.h>
|
|
#ifndef __wasi__
|
|
// WASI does not provide this header, either way we disable use
|
|
@@ -84,9 +84,9 @@ void SetCurrentThreadIdentity(ThreadIdentity* identity,
|
|
absl::call_once(init_thread_identity_key_once, AllocateThreadIdentityKey,
|
|
reclaimer);
|
|
|
|
-#if defined(__wasi__) || defined(__EMSCRIPTEN__) || defined(__MINGW32__) || \
|
|
+#if defined(__wasi__) || defined(__EMSCRIPTEN__) || \
|
|
defined(__hexagon__)
|
|
- // Emscripten, WASI and MinGW pthread implementations does not support
|
|
+ // Emscripten and WASI pthread implementations does not support
|
|
// signals. See
|
|
// https://kripken.github.io/emscripten-site/docs/porting/pthreads.html for
|
|
// more information.
|
|
@@ -106,7 +106,7 @@ void SetCurrentThreadIdentity(ThreadIdentity* identity,
|
|
pthread_setspecific(thread_identity_pthread_key,
|
|
reinterpret_cast<void*>(identity));
|
|
pthread_sigmask(SIG_SETMASK, &curr_signals, nullptr);
|
|
-#endif // !__EMSCRIPTEN__ && !__MINGW32__
|
|
+#endif // !__EMSCRIPTEN__
|
|
|
|
#elif ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_TLS
|
|
// NOTE: Not async-safe. But can be open-coded.
|
|
diff --git a/abseil-cpp/absl/base/internal/thread_identity.h b/abseil-cpp/absl/base/internal/thread_identity.h
|
|
index a9f26d06557..86fad8ceaa7 100644
|
|
--- a/abseil-cpp/absl/base/internal/thread_identity.h
|
|
+++ b/abseil-cpp/absl/base/internal/thread_identity.h
|
|
@@ -271,7 +271,7 @@ void ClearCurrentThreadIdentity();
|
|
#error ABSL_THREAD_IDENTITY_MODE cannot be directly set
|
|
#elif defined(ABSL_FORCE_THREAD_IDENTITY_MODE)
|
|
#define ABSL_THREAD_IDENTITY_MODE ABSL_FORCE_THREAD_IDENTITY_MODE
|
|
-#elif defined(_WIN32) && !defined(__MINGW32__)
|
|
+#elif defined(_WIN32)
|
|
#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_CPP11
|
|
#elif defined(__APPLE__) && defined(ABSL_HAVE_THREAD_LOCAL)
|
|
#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_CPP11
|
|
diff --git a/abseil-cpp/absl/synchronization/internal/pthread_waiter.h b/abseil-cpp/absl/synchronization/internal/pthread_waiter.h
|
|
index 23db76ad442..eb30b24d0e3 100644
|
|
--- a/abseil-cpp/absl/synchronization/internal/pthread_waiter.h
|
|
+++ b/abseil-cpp/absl/synchronization/internal/pthread_waiter.h
|
|
@@ -16,7 +16,7 @@
|
|
#ifndef ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_
|
|
#define ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_
|
|
|
|
-#if !defined(_WIN32) && !defined(__MINGW32__)
|
|
+#if !defined(_WIN32)
|
|
#include <pthread.h>
|
|
|
|
#include "absl/base/config.h"
|
|
@@ -55,6 +55,6 @@ class PthreadWaiter : public WaiterCrtp<PthreadWaiter> {
|
|
ABSL_NAMESPACE_END
|
|
} // namespace absl
|
|
|
|
-#endif // !defined(_WIN32) && !defined(__MINGW32__)
|
|
+#endif // !defined(_WIN32)
|
|
|
|
#endif // ABSL_SYNCHRONIZATION_INTERNAL_PTHREAD_WAITER_H_
|
|
diff --git a/abseil-cpp/absl/synchronization/internal/win32_waiter.h b/abseil-cpp/absl/synchronization/internal/win32_waiter.h
|
|
index fdab264e8cb..cba1c9d8834 100644
|
|
--- a/abseil-cpp/absl/synchronization/internal/win32_waiter.h
|
|
+++ b/abseil-cpp/absl/synchronization/internal/win32_waiter.h
|
|
@@ -20,7 +20,7 @@
|
|
#include <sdkddkver.h>
|
|
#endif
|
|
|
|
-#if defined(_WIN32) && !defined(__MINGW32__) && \
|
|
+#if defined(_WIN32) && \
|
|
_WIN32_WINNT >= _WIN32_WINNT_VISTA
|
|
|
|
#include "absl/base/config.h"
|
|
@@ -66,7 +66,7 @@ class Win32Waiter : public WaiterCrtp<Win32Waiter> {
|
|
ABSL_NAMESPACE_END
|
|
} // namespace absl
|
|
|
|
-#endif // defined(_WIN32) && !defined(__MINGW32__) &&
|
|
+#endif // defined(_WIN32) &&
|
|
// _WIN32_WINNT >= _WIN32_WINNT_VISTA
|
|
|
|
#endif // ABSL_SYNCHRONIZATION_INTERNAL_WIN32_WAITER_H_
|