Skip to content

Commit

Permalink
[Crashpad] Update to latest version 2024-05-10
Browse files Browse the repository at this point in the history
* [crashpad]: update to latest version

* [crashpad]: fix atomic_thread_fence

* [crashpad]: update version db

* [crashpad]: add workflow
  • Loading branch information
RealChuan authored May 17, 2024
1 parent fb4f9de commit fdc24b8
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 4 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/crashpad.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: crashpad

on:
push:
paths:
- '.github/workflows/crashpad.yml'
- 'ports/crashpad/**'
pull_request:
paths:
- '.github/workflows/crashpad.yml'
- 'ports/crashpad/**'

jobs:
build-ubuntu:
name: Build on ubuntu
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
triplet: [x64-linux]

steps:
- uses: actions/checkout@v4

- name: Install vcpkg-tool
shell: bash
run: ./bootstrap-vcpkg.sh

- name: Build
shell: bash
run: |
./vcpkg install crashpad --triplet ${{ matrix.triplet }} \
|| (cat ./installed/vcpkg/issue_body.md && exit 1)
build-macos:
name: Build on macos
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, macos-13]
triplet: [x64-osx, arm64-osx]

steps:
- name: Install deps
shell: bash
run: |
if [ "${{ matrix.os }}" = "macos-14" ]; then
brew install python-setuptools
else
pip3 install setuptools
fi
- uses: actions/checkout@v4

- name: Install vcpkg-tool
shell: bash
run: ./bootstrap-vcpkg.sh

- name: Build
shell: bash
run: |
./vcpkg install crashpad --triplet ${{ matrix.triplet }} \
|| (cat ./installed/vcpkg/issue_body.md && exit 1)
build-windows:
name: Build on windows
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2019]
triplet:
- x64-windows
- x64-windows-static-md
- x86-windows
- x86-windows-static-md

steps:
- uses: actions/checkout@v4

- name: Install vcpkg-tool
shell: pwsh
run: .\bootstrap-vcpkg.bat

- name: Build
shell: bash
run: |
./vcpkg.exe install crashpad --triplet ${{ matrix.triplet }} \
|| (cat ./installed/vcpkg/issue_body.md && exit 1)
13 changes: 13 additions & 0 deletions ports/crashpad/fix-atomic_thread_fence.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/base/atomicops_internals_portable.h b/base/atomicops_internals_portable.h
index 2486fb7..ffbab08 100644
--- a/base/atomicops_internals_portable.h
+++ b/base/atomicops_internals_portable.h
@@ -54,7 +54,7 @@ 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);
+ __atomic_thread_fence(static_cast<int>(std::memory_order_seq_cst));
#else
std::atomic_thread_fence(std::memory_order_seq_cst);
#endif
7 changes: 5 additions & 2 deletions ports/crashpad/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://chromium.googlesource.com/crashpad/crashpad
REF 7e0af1d4d45b526f01677e74a56f4a951b70517d
REF 1174aa4fc3196f478b5b4b77fc970d1cb85cb7cf
)

vcpkg_find_acquire_program(PYTHON3)
Expand All @@ -18,17 +18,20 @@ function(checkout_in_path PATH URL REF)
OUT_SOURCE_PATH DEP_SOURCE_PATH
URL "${URL}"
REF "${REF}"
PATCHES "${PATCH_FILE}"
)
file(RENAME "${DEP_SOURCE_PATH}" "${PATH}")
file(REMOVE_RECURSE "${DEP_SOURCE_PATH}")
endfunction()

# mini_chromium contains the toolchains and build configuration
set(PATCH_FILE "fix-atomic_thread_fence.patch")
checkout_in_path(
"${SOURCE_PATH}/third_party/mini_chromium/mini_chromium"
"https://chromium.googlesource.com/chromium/mini_chromium"
"dce72d97d1c2e9beb5e206c6a05a702269794ca3"
"a6607b1fd76b740f31c2249fef2c0bec27ffbe52"
)
set(PATCH_FILE "")

if(VCPKG_TARGET_IS_LINUX)
# fetch lss
Expand Down
2 changes: 1 addition & 1 deletion ports/crashpad/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crashpad",
"version-date": "2024-04-11",
"version-date": "2024-05-10",
"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."
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,7 @@
"port-version": 2
},
"crashpad": {
"baseline": "2024-04-11",
"baseline": "2024-05-10",
"port-version": 0
},
"crashrpt": {
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/crashpad.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b5cf64b2017b9e79f210ff3aa8b1d84e794508bc",
"version-date": "2024-05-10",
"port-version": 0
},
{
"git-tree": "faece66eb2a9a6f95f5a11c7f4ebd3cefd70d54f",
"version-date": "2024-04-11",
Expand Down

0 comments on commit fdc24b8

Please sign in to comment.