Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ jobs:
platform: ubuntu-22.04
CC: clang
CXX: clang++
- name: Alpine Linux (GCC + musl)
platform: ubuntu-latest
container: alpine:3.21
CC: gcc
CXX: g++
- name: Alpine Linux (clang + musl)
platform: ubuntu-latest
container: alpine:3.21
CC: clang
CXX: clang++
- name: Windows (x64)
platform: windows-latest
- name: Windows ClangCL (x64)
Expand All @@ -59,15 +69,22 @@ jobs:
platform: macos-latest
name: ${{ matrix.name }}
runs-on: ${{ matrix.platform }}
container: ${{ matrix.container }}
env:
CMAKE_DEFINES: "${{ matrix.CMAKE_DEFINES }}"
steps:
- name: Installing Alpine Linux Dependencies
if: ${{ contains(matrix.container, 'alpine') }}
run: |
apk update
apk add git bash build-base clang cmake zlib-dev curl-dev openssl-dev libunwind-dev linux-headers pkgconf

- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Installing Linux Dependencies
if: ${{ runner.os == 'Linux' }}
- name: Installing Ubuntu Dependencies
if: ${{ runner.os == 'Linux' && !matrix.container }}
run: |
sudo apt update
sudo apt install clang zlib1g-dev libcurl4-openssl-dev libssl-dev libunwind-dev pkg-config
Expand Down
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
)
endif()

if(LINUX)
target_compile_definitions(crashpad_interface INTERFACE
_FILE_OFFSET_BITS=64
_LARGEFILE64_SOURCE
_LARGEFILE_SOURCE
)
endif()

add_library(crashpad::interface ALIAS crashpad_interface)

add_subdirectory(compat)
Expand Down
2 changes: 2 additions & 0 deletions compat/linux/sys/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#include_next <sys/ptrace.h>

#ifdef __GLIBC__
#include <sys/cdefs.h>
#endif

// https://sourceware.org/bugzilla/show_bug.cgi?id=22433
#if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
Expand Down
7 changes: 7 additions & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ if(CRASHPAD_BUILD_TOOLS)
$<$<COMPILE_LANGUAGE:CXX>:-Wno-multichar>
)
endif()
if(LINUX)
target_compile_definitions(crashpad_generate_dump PRIVATE
_FILE_OFFSET_BITS=64
_LARGEFILE64_SOURCE
_LARGEFILE_SOURCE
)
endif()
crashpad_install_target(crashpad_generate_dump)

if(APPLE)
Expand Down