Strip debug sections from the shipped Linux binaries - #12
Merged
Conversation
The release profile compiles with debug = 1 for readable backtraces, and ELF embeds that DWARF straight into the executable, so the Linux artifacts were shipping it. Strip it at packaging time -- before appimage.sh and the dist/ copies -- so neither the AppImage payload nor the loose binaries carry it, while local release builds keep their line tables. Symbols stay; only debug sections go. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
debug = 1so local release builds get readable backtraces, and ELF is the one binary format that embeds the resulting DWARF in the executable itself — the Linux release artifacts were shipping it (macOS/Windows put it in dSYM/PDB side files that are never packaged).strip --strip-debugontarget/release/schistandtarget/release/schist-mcpin the Linux packaging step, beforeappimage.shand thedist/copies, so the AppImage payload and both loose binaries ship without debug sections.--strip-debugleaves the symbol table intact, so shipped binaries still symbolicate panics by function name, anddebug = 1keeps working for local builds.Testing
appimage.shre-runscargo build --releaseafterwards, and a local test confirmed that build is a no-op that leaves the stripped output untouched.🤖 Generated with Claude Code