[crashpad] Fix build errors under linux (#39671)

This commit is contained in:
jim wang 2024-07-09 17:34:01 +00:00 committed by GitHub
parent 9967bb4996
commit 45bcef6891
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 47 additions and 2 deletions

View File

@ -0,0 +1,14 @@
diff --git a/util/misc/uuid.cc b/util/misc/uuid.cc
index 3013d7b..4cc135f 100644
--- a/util/misc/uuid.cc
+++ b/util/misc/uuid.cc
@@ -41,7 +41,8 @@
namespace crashpad {
static_assert(sizeof(UUID) == 16, "UUID must be 16 bytes");
-static_assert(std::is_pod<UUID>::value, "UUID must be POD");
+static_assert(std::is_standard_layout<UUID>::value, "UUID must be a standard-layout type");
+static_assert(std::is_trivial<UUID>::value, "UUID must be a trivial type");
bool UUID::operator==(const UUID& that) const {
return memcmp(this, &that, sizeof(*this)) == 0;

View File

@ -0,0 +1,18 @@
diff --git a/base/atomicops_internals_portable.h b/base/atomicops_internals_portable.h
index 2486fb7..88e2d2d 100644
--- a/base/atomicops_internals_portable.h
+++ b/base/atomicops_internals_portable.h
@@ -51,13 +51,7 @@ static_assert(sizeof(*(AtomicLocation32) nullptr) == sizeof(Atomic32),
"incompatible 32-bit atomic layout");
inline void MemoryBarrier() {
-#if defined(__GLIBCXX__)
- // Work around libstdc++ bug 51038 where atomic_thread_fence was declared but
- // not defined, leading to the linker complaining about undefined references.
- __atomic_thread_fence(std::memory_order_seq_cst);
-#else
std::atomic_thread_fence(std::memory_order_seq_cst);
-#endif
}
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,

View File

@ -4,6 +4,8 @@ vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://chromium.googlesource.com/crashpad/crashpad
REF 7e0af1d4d45b526f01677e74a56f4a951b70517d
PATCHES
fix-linux.patch
)
vcpkg_find_acquire_program(PYTHON3)
@ -29,6 +31,11 @@ checkout_in_path(
"https://chromium.googlesource.com/chromium/mini_chromium"
"dce72d97d1c2e9beb5e206c6a05a702269794ca3"
)
vcpkg_apply_patches(
SOURCE_PATH "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium"
PATCHES
"fix-std-20.patch"
)
if(VCPKG_TARGET_IS_LINUX)
# fetch lss

View File

@ -1,6 +1,7 @@
{
"name": "crashpad",
"version-date": "2024-04-11",
"port-version": 1,
"description": [
"Crashpad is a crash-reporting system.",
"Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss."

View File

@ -265,7 +265,7 @@ cppcoro:arm64-osx=fail
cppcoro:x64-linux=fail
cppcoro:x64-osx=fail
cpputest:arm-neon-android=fail
crashpad:x64-linux=fail
crashpad:x64-linux=fail #Compilation failed due to the lack of Clang++ compiler.
cserialport:arm-neon-android=fail
cserialport:arm64-android=fail
cserialport:x64-android=fail

View File

@ -2010,7 +2010,7 @@
},
"crashpad": {
"baseline": "2024-04-11",
"port-version": 0
"port-version": 1
},
"crashrpt": {
"baseline": "1.4.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "43c2573b9400b543b26e7c9fbb091bdfefa51b79",
"version-date": "2024-04-11",
"port-version": 1
},
{
"git-tree": "faece66eb2a9a6f95f5a11c7f4ebd3cefd70d54f",
"version-date": "2024-04-11",