Skip to content

Commit 5cb0986

Browse files
fix: build error introduced by crashpad C++17 support (#1118)
* fix: build error introduced by `crashpad` C++17 support * introduce a GCC 9.4.0 runner * update dependencies for new runner * remove new runner from old deps * update crashpad * update crashpad * remove -Wno-gnu-include-next from senntry compile options * update crashpad * remove handle_ex target * update crashpad * remove gnu-include-next warnings only for non GNU compilers * disable pedantic on sentry_boot.h for sentry_info.c * reset werror for GCC until we fix the crashpad compat * fix typo Co-authored-by: JoshuaMoelans <[email protected]> * update crashpad --------- Co-authored-by: JoshuaMoelans <[email protected]>
1 parent 60a5e61 commit 5cb0986

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jobs:
4444
CC: gcc-7
4545
CXX: g++-7
4646
TEST_X86: 1
47+
- name: Linux (GCC 9.4.0)
48+
os: ubuntu-20.04
49+
CC: gcc
50+
CXX: g++
51+
# ERROR_ON_WARNINGS: 1
4752
- name: Linux (GCC 12)
4853
os: ubuntu-22.04
4954
CC: gcc-12
@@ -135,11 +140,17 @@ jobs:
135140
cache: "pip"
136141

137142
- name: Installing Linux Dependencies
138-
if: ${{ runner.os == 'Linux' && !env['TEST_X86'] }}
143+
if: ${{ runner.os == 'Linux' && matrix.os != 'ubuntu-20.04' && !env['TEST_X86'] }}
139144
run: |
140145
sudo apt update
141146
sudo apt install cmake clang-14 clang-tools llvm kcov g++-12 valgrind zlib1g-dev libcurl4-openssl-dev
142147
148+
- name: Installing Linux GCC 9.4.0 Dependencies
149+
if: ${{ runner.os == 'Linux' && matrix.os == 'ubuntu-20.04' && !env['TEST_X86'] }}
150+
run: |
151+
sudo apt update
152+
sudo apt install cmake clang-tools llvm kcov g++ valgrind zlib1g-dev libcurl4-openssl-dev
153+
143154
- name: Installing Linux 32-bit Dependencies
144155
if: ${{ runner.os == 'Linux' && env['TEST_X86'] }}
145156
run: |

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
**Fixes**:
6+
7+
- Fix a build error on older compilers introduced by C++17 support in `0.7.18` for the `crashpad` backend. ([#1118](https://github.com/getsentry/sentry-native/pull/1118), [crashpad#117](https://github.com/getsentry/crashpad/pull/117), [mini_chromium#2](https://github.com/getsentry/mini_chromium/pull/2))
8+
39
## 0.7.18
410

511
**Features**:

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,11 @@ else()
346346
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wall -Wextra -Wpedantic>)
347347
# The crashpad and breakpad headers generate the following warnings that we
348348
# ignore specifically
349-
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wno-variadic-macros -Wno-gnu-include-next -Wno-multichar>)
349+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
350+
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wno-variadic-macros -Wno-multichar>)
351+
else()
352+
target_compile_options(sentry PRIVATE $<BUILD_INTERFACE:-Wno-variadic-macros -Wno-gnu-include-next -Wno-multichar>)
353+
endif()
350354
# ignore all warnings for mpack
351355
set_source_files_properties(
352356
"${PROJECT_SOURCE_DIR}/vendor/mpack.c"

0 commit comments

Comments
 (0)