build: 缩小发布二进制并分离调试符号#5
Merged
Merged
Conversation
链接时加 --gc-sections + 段切分,丢掉静态链入的 iceoryx/CycloneDDS 中未引用的代码;Release 默认 -Os。x86_64 发布版 bin 从 ~4.0MB 降到 ~2.25MB(约 -44%),-g 保留。 release.yml 在打包时用 objcopy 把 .debug 符号分离出来:发布的 bin strip 后通过 --add-gnu-debuglink 关联符号档,符号包只作为 CI artifact 上传、不挂公开 Release。 gitignore 补上 per-arch 安装前缀(yaml-cpp-*/、iceoryx-*/)。
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.
链接时加 --gc-sections + 段切分,丢掉静态链入的 iceoryx/CycloneDDS 中未引用的代码;Release 默认 -Os。x86_64 发布版 bin 从 ~4.0MB 降到
~2.25MB(约 -44%),-g 保留。
release.yml 在打包时用 objcopy 把 .debug 符号分离出来:发布的 bin
strip 后通过 --add-gnu-debuglink 关联符号档,符号包只作为 CI artifact 上传、不挂公开 Release。
gitignore 补上 per-arch 安装前缀(yaml-cpp-/、iceoryx-/)。