Strip debug symbols from release builds of loadable extension - #123
Merged
Merged
Conversation
The distributed extension binary shipped with its full static symbol table and debug sections, which together are roughly a fifth of its size. DuckDB resolves the extension entry points through the dynamic symbol table, which stripping keeps, so drop the rest at link time for release builds. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjsJd1n9cLQJTuiW6Lpno1
myrrc
approved these changes
Sep 8, 2026
myrrc
marked this pull request as ready for review
September 8, 2026 12:56
myrrc
enabled auto-merge (squash)
September 8, 2026 12:56
myrrc
disabled auto-merge
September 8, 2026 13:03
Stripping stays the default for release builds, but the option lets a developer relink with the symbol table intact so crash backtraces keep function names. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjsJd1n9cLQJTuiW6Lpno1
myrrc
enabled auto-merge (squash)
September 8, 2026 13:30
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 8, 2026
* Strip the loadable extension in release builds The distributed extension binary shipped with its full static symbol table and debug sections, which together are roughly a fifth of its size. DuckDB resolves the extension entry points through the dynamic symbol table, which stripping keeps, so drop the rest at link time for release builds. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjsJd1n9cLQJTuiW6Lpno1 * Add VORTEX_STRIP_EXTENSION option to keep symbols when debugging Stripping stays the default for release builds, but the option lets a developer relink with the symbol table intact so crash backtraces keep function names. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WjsJd1n9cLQJTuiW6Lpno1 --------- Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit 2aaba5f)
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
This change optimizes the size of release builds of the loadable extension by stripping debug symbols and the static symbol table, reducing the distributed binary to approximately one-fifth of its original size.
Key Changes
-xlinker flag to strip local symbols--strip-alllinker flag to remove all symbolsImplementation Details
CMAKE_BUILD_TYPEis set to "Release"https://claude.ai/code/session_01WjsJd1n9cLQJTuiW6Lpno1