Separate debug symbols for the _lbug extension - #55
Merged
Conversation
Enforce hidden visibility for smaller binaries and keep debug info in Release builds (-g / /Zi+/DEBUG) so it can be split into separate symbol files: .dSYM on macOS (dsymutil + strip -S), .pdb on Windows (native), .debug on Linux (objcopy split + gnu-debuglink). Wheel builds consume these via split_debug_symbols.py in the main repo.
Wheel builds set -DLBUG_SPLIT_DEBUG_SYMBOLS=OFF via setup.py: raw .debug/dSYM artifacts packaged inside the wheel break auditwheel repair, and the split instead happens on the final repaired wheel (where the debug info must still be present). Local builds keep the previous split-at-build-time behavior (default ON).
pybind11_add_module() unconditionally attaches a POST_BUILD
${CMAKE_STRIP} step -- plain `strip` on Linux, i.e. --strip-all --
which runs before our own split and destroys both symtab and DWARF.
Wheel builds therefore produced empty ~3KB .debug stubs (macOS was
unaffected: `strip -x` keeps DWARF; Windows: CMAKE_STRIP unset).
Stripping is now owned solely by the LBUG_SPLIT_DEBUG_SYMBOLS pipeline
(in-build objcopy split, or host-side split_debug_symbols.py for
wheels), both of which preserve .symtab so addresses stay mappable to
function names.
adsharma
added a commit
to LadybugDB/ladybug
that referenced
this pull request
Sep 7, 2026
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).
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.
Enforces hidden visibility for smaller binaries and keeps debug info in Release builds so it can be split into separate symbol files:
dsymutilinto a .dSYM bundle +strip -S/Zi+/DEBUG(plus/OPT:REF,ICFin Release)objcopysplit into_lbug.debug+--add-gnu-debuglinkTool lookups are non-fatal so unusual toolchains don't hard-fail.
Companion PR in LadybugDB/ladybug wires this into the wheel workflow (split on final repaired wheels + upload symbol artifacts).