Split debug symbols out of Python wheels - #927
Merged
Merged
Conversation
Add per-OS symbol separation after cibuildwheel builds so shipped wheels stay stripped while crash reports remain debuggable: - Linux: objcopy split into .debug + gnu-debuglink - macOS: dsymutil into .dSYM + strip -S (regenerated post-delocate) - Windows: extract .pdb, drop .exp/.lib byproducts scripts/pip-package/split_debug_symbols.py does the split and repacks each wheel with a corrected RECORD; the workflow uploads the extracted symbols as separate per-platform artifacts. Depends on LadybugDB/ladybug-python#55 (submodule bump included here).
- setup.py now passes -DLBUG_SPLIT_DEBUG_SYMBOLS=OFF: raw .debug/dSYM
artifacts packaged inside the wheel crashed auditwheel repair
(pyelftools 'Section' object has no attribute 'iter_versions').
The split happens on the final repaired wheel instead, which needs
the debug info still present in the shipped binary.
- split_debug_symbols.py: _find_extensions no longer matches binaries
inside *.dSYM bundles ('.dSYM' is a suffix of the bundle dir name,
not a standalone path part) -- this made dsymutil run on the DWARF
file itself. macOS path also reuses a shipped dSYM when the .so is
already stripped, mirroring the Linux reuse path.
- Bump tools/python_api for the LBUG_SPLIT_DEBUG_SYMBOLS gate.
adsharma
force-pushed
the
split-debug-symbols
branch
from
September 7, 2026 04:28
450c2ff to
9657600
Compare
Contributor
Author
|
Validated here: https://github.com/LadybugDB/ladybug/actions/runs/34081405770 |
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.
Depends on LadybugDB/ladybug-python#55 (submodule bump to
cafd946included here).Splits debug info out of the final repaired wheels so shipped wheels stay stripped while crash reports remain debuggable:
objcopysplit into.debug+--add-gnu-debuglinkdsymutilinto a.dSYMbundle +strip -S, regenerated post-delocate so it matches the shipped binary.pdbfrom the wheel, drop `.exp$/$.lib$ linker byproductsNew
scripts/pip-package/split_debug_symbols.pyperforms the split and repacks each wheel with a correctedRECORD; the workflow uploads the extracted symbols as separate per-platform artifacts (manylinux_2_28-symbols-<arch>/<os>-symbols-<platform>).The splitter reuses an in-build
.debugwhen the binary is already stripped (covers the CMakePOST_BUILDpath) and regenerates from the final binary otherwise, so there is no double-strip hazard.