build: add SENTRY_LIBUNWIND_SYSTEM option#1753
Merged
Merged
Conversation
supervacuus
approved these changes
May 27, 2026
Collaborator
supervacuus
left a comment
There was a problem hiding this comment.
This is fine, but it requires clear documentation under compile options in the README.
In this proposed setup, there is a dramatic asymmetry that this documentation should highlight:
- The vendored
libunwindwill always be built as a static archive and either linked into the resulting shared library or colocated with the other resulting static artifacts as output. This is what most Native SDK consumers will expect. - when
SENTRY_LIBUNWIND_SYSTEM=On, the decision of what kind of library artifact will be included is entirely deferred to the host distribution/sysroot/package manager. This path only considersSENTRY_BUILD_SHARED_LIBSin terms of how it makes an artifact available to a consuming CMake project, not in terms of how contained the resulting deployable install will be. The latter will have to be solved externally (either via a package manager configuration or through a very careful setup of packages on the build and target machines).
The latter, besides being different from the former, is also in stark contrast to what we had before we vendored libunwind as the default unwinder on Linux.
This is neither good nor bad, but it requires clear documentation of expectations, since it is now part of the build and package contract. The story is entirely different for users who can configure their build from within a source-level package manager like conan or vcpkg, and those who build and deploy against binary distro packages.
supervacuus
reviewed
May 27, 2026
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.
Add
SENTRY_LIBUNWIND_SYSTEMas a Linux-only opt-in for using systemlibunwindvia pkg-config instead of the vendored copy.Verified with the Alpine CI builds:
Close: #1714