Strip the libraries in the vcpkg package - #6556
Merged
Merged
Conversation
16 MB of .symtab/.strtab that nothing needs: linking uses .dynsym, and the wheels and the AppImage have always shipped stripped.
oitel
approved these changes
Aug 7, 2026
Comment on lines
+35
to
+36
| # --strip drops .symtab/.strtab: linking needs only .dynsym, and the wheels | ||
| # and the AppImage have always shipped stripped. |
Fedr
added a commit
that referenced
this pull request
Aug 17, 2026
Same as #6556 did for the vcpkg package. The bindings use install -s so they are stripped before the patchelf calls, not after -- that order is what corrupts load commands.
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.
The
linux-vcpkgtar.xzis the last artifact that ships unstripped libraries:cmake --installis called without--strip, while the wheels (#6525) and the AppImage (linuxdeploy strips unlessNO_STRIPis set) have always been stripped. Measured on theRelease/Clang 21legs, the MeshLib shared libraries alone carry 16.3 MB (x64) and 17.6 MB (arm64) of.symtab/.strtab:.soinbuild/Release/binThose sections are not
SEC_ALLOC— never loaded at runtime — and linking against the package needs only.dynsym, whichstripkeeps. This also removes the wart that #6550 left behind:-ffunction-sectionsgrows.symtab(per-function section symbols), which is invisible everywhere except in this one artifact.Trade-off worth stating: backtraces taken inside the shipped libraries lose the names of non-exported functions, since MeshLib builds with
-fvisibility=hidden. That is already true of every wheel and AppImage we publish, so this only makes the vcpkg package consistent with them.Third-party libraries copied from vcpkg are left alone: blanket-stripping that tree would hit
.aarchives, where it breaks linking.Sizes
Packaged twice in one job on a throwaway branch — once as this PR does, once with
--stripremoved:meshlib_linux-vcpkg.tar.xz16.3 MB (x64) / 17.6 MB (arm64) of raw symbol tables compress down to a 1.5 MB / 2.1 MB saving in the shipped archive — they compress about 9:1, but the absolute win is still real, and the uncompressed install shrinks by the full amount.
This also closes the one caveat left by #6550:
-ffunction-sectionsinflates.symtab, and this package was the only artifact that carried it.Testing
linux-vcpkgonly; the script is not used by any other platform. TheCreate Package→Extract Package→Build C++/C examplessteps in that job build the examples against the stripped package, which is the check that matters here.