From 8761a77d7e02726e5461737fa2bef23e45557308 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Thu, 14 May 2026 00:22:53 -0700 Subject: [PATCH] [crashpad] Support the VS Build Tools SKU (#51756) --- ports/crashpad/fix-lib-name-conflict-1.patch | 24 ++++++++++---------- ports/crashpad/fix-linux.patch | 4 ++-- ports/crashpad/fix-std-20.patch | 4 ++-- ports/crashpad/portfile.cmake | 2 ++ ports/crashpad/support-build-tools-sku.diff | 13 +++++++++++ ports/crashpad/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/c-/crashpad.json | 5 ++++ 8 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 ports/crashpad/support-build-tools-sku.diff diff --git a/ports/crashpad/fix-lib-name-conflict-1.patch b/ports/crashpad/fix-lib-name-conflict-1.patch index 0eaec93a46..b56c480f89 100644 --- a/ports/crashpad/fix-lib-name-conflict-1.patch +++ b/ports/crashpad/fix-lib-name-conflict-1.patch @@ -1,12 +1,12 @@ -diff --git a/base/BUILD.gn b/base/BUILD.gn -index 0bcf519..c637f2b 100644 ---- a/base/BUILD.gn -+++ b/base/BUILD.gn -@@ -5,6 +5,7 @@ - import("../build/platform.gni") - - static_library("base") { -+ output_name = "vcpkg_crashpad_base" - sources = [ - "atomicops.h", - "atomicops_internals_atomicword_compat.h", +diff --git a/base/BUILD.gn b/base/BUILD.gn +index 0bcf519..5e7b553 100644 +--- a/base/BUILD.gn ++++ b/base/BUILD.gn +@@ -5,6 +5,7 @@ + import("../build/platform.gni") + + static_library("base") { ++ output_name = "vcpkg_crashpad_base" + sources = [ + "atomicops.h", + "atomicops_internals_atomicword_compat.h", diff --git a/ports/crashpad/fix-linux.patch b/ports/crashpad/fix-linux.patch index a24968617e..a3938a92f7 100644 --- a/ports/crashpad/fix-linux.patch +++ b/ports/crashpad/fix-linux.patch @@ -4,11 +4,11 @@ index 3013d7b..4cc135f 100644 +++ 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::value, "UUID must be POD"); +static_assert(std::is_standard_layout::value, "UUID must be a standard-layout type"); +static_assert(std::is_trivial::value, "UUID must be a trivial type"); - + bool UUID::operator==(const UUID& that) const { return memcmp(this, &that, sizeof(*this)) == 0; diff --git a/ports/crashpad/fix-std-20.patch b/ports/crashpad/fix-std-20.patch index 45e29641fe..75069cf491 100644 --- a/ports/crashpad/fix-std-20.patch +++ b/ports/crashpad/fix-std-20.patch @@ -4,7 +4,7 @@ index 2486fb7..88e2d2d 100644 +++ 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 @@ -14,5 +14,5 @@ index 2486fb7..88e2d2d 100644 std::atomic_thread_fence(std::memory_order_seq_cst); -#endif } - + inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, diff --git a/ports/crashpad/portfile.cmake b/ports/crashpad/portfile.cmake index 132ffd8b83..87797d24c3 100644 --- a/ports/crashpad/portfile.cmake +++ b/ports/crashpad/portfile.cmake @@ -26,8 +26,10 @@ if(NOT EXISTS "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/BUILD.gn") PATCHES fix-std-20.patch ndk-toolchain.diff + support-build-tools-sku.diff fix-lib-name-conflict-1.patch ) + file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium") file(RENAME "${mini_chromium}" "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium") endif() diff --git a/ports/crashpad/support-build-tools-sku.diff b/ports/crashpad/support-build-tools-sku.diff new file mode 100644 index 0000000000..4d89ac8ce6 --- /dev/null +++ b/ports/crashpad/support-build-tools-sku.diff @@ -0,0 +1,13 @@ +diff --git a/build/win_helper.py b/build/win_helper.py +index be977c8..dd5d06d 100644 +--- a/build/win_helper.py ++++ b/build/win_helper.py +@@ -186,7 +186,7 @@ class WinTool(object): + 'Microsoft Visual Studio', 'Installer', 'vswhere.exe') + if os.path.exists(vswhere_path): + installation_path = subprocess.check_output( +- [vswhere_path, '-latest', '-property', 'installationPath']).strip() ++ [vswhere_path, '-latest', '-products', '*', '-property', 'installationPath']).strip() + if installation_path: + return (installation_path.decode("utf-8"), + os.path.join('VC', 'Auxiliary', 'Build', 'vcvarsall.bat')) diff --git a/ports/crashpad/vcpkg.json b/ports/crashpad/vcpkg.json index 738f3ef225..eb4cb9dde9 100644 --- a/ports/crashpad/vcpkg.json +++ b/ports/crashpad/vcpkg.json @@ -1,7 +1,7 @@ { "name": "crashpad", "version-date": "2024-04-11", - "port-version": 11, + "port-version": 12, "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." diff --git a/versions/baseline.json b/versions/baseline.json index 6682d80f19..87bb008bdc 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2178,7 +2178,7 @@ }, "crashpad": { "baseline": "2024-04-11", - "port-version": 11 + "port-version": 12 }, "crashrpt": { "baseline": "1.4.3", diff --git a/versions/c-/crashpad.json b/versions/c-/crashpad.json index d2100a89c8..07f3c363c0 100644 --- a/versions/c-/crashpad.json +++ b/versions/c-/crashpad.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "991d306e67bce6818dbf33d079075358b8943f59", + "version-date": "2024-04-11", + "port-version": 12 + }, { "git-tree": "72faa94ef243fcd582120dac62c2573e538234bc", "version-date": "2024-04-11",