Repository navigation
Conversation
Collaborator
Author
|
Superseded by getsentry/crashpad#181 |
Build breakpad with `/W3` on MSVC and `-Wall` elsewhere, and treat breakpad's and crashpad's warnings as errors with `SENTRY_ERROR_ON_WARNINGS`. Bump breakpad and crashpad to fix their warnings.
jpnurmi
force-pushed
the
jpnurmi/build/external-error-on-warnings
branch
from
November 20, 2026 11:14
ba7464e to
cfddf39
Compare
Add `/WX` to sentry, crashpad and breakpad when the option is enabled, like `-Werror` on other compilers.
SENTRY_ERROR_ON_WARNINGS to breakpad and crashpadSENTRY_ERROR_ON_WARNINGS to MSVC, breakpad and crashpad
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1 #2315 +/- ##
==========================================
+ Coverage 75.72% 75.78% +0.06%
==========================================
Files 105 105
Lines 30936 30936
Branches 5775 5775
==========================================
+ Hits 23426 23445 +19
+ Misses 6075 6054 -21
- Partials 1435 1437 +2 🚀 New features to boost your workflow:
|
jpnurmi
marked this pull request as ready for review
November 20, 2026 12:08
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3831d9d. Configure here.
clang-cl maps `-Wall` to `-Weverything`, so the warnings that clang 21 added fail the `sentry` build with the clang-cl 22.1.3 that ships with Visual Studio 2026. ```text include\sentry.h(955,11): error: identifier 'wchar_t' conflicts with a C++ keyword [-Werror,-Wc++-keyword] src\sentry_attachment.c(233,12): error: not eliding copy on return [-Werror,-Wnrvo] src\backends\sentry_backend_inproc.c(147,31): error: padding struct 'struct sentry_inproc_backend_config_s' with 3 bytes to align 'handler_strategy' [-Werror,-Wpadded] ```
Bump to the merge commits of getsentry/breakpad#47 and getsentry/crashpad#181.
`sentry-crash` copied the warning options from `sentry` only on GCC and Clang, so `SENTRY_ERROR_ON_WARNINGS` did not reach the daemon on MSVC. Ref: #2315 (comment)
Run the ClangCL build and tests on `windows-2025-vs2026` as well, which ships a newer clang-cl than VS 2022. Let CMake pick the installed Visual Studio instead of forcing the VS 2022 generator.
clang-cl always built `sentry` with `-Werror`, so each new clang-cl warning broke the build for everyone. Leave it to the `/WX` that `SENTRY_ERROR_ON_WARNINGS` adds.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

SENTRY_ERROR_ON_WARNINGSnow also adds/WXon MSVC, and applies to breakpad, crashpad and sentry-crash in addition to sentry itself. Breakpad builds with/W3or-Wall, and crashpad with/W4or-Wall, depending on the compiler used. Sentry-crash builds with the same options as sentry, now on MSVC too.Also fixes the clang-cl build with VS 2026, and adds a ClangCL CI job for it:
See also: