Repository navigation
build: use thin LTO for release, add dist profile for shipped binaries - #136
Merged
Merged
Conversation
Local release builds drop from ~105s to ~78s. GitHub release workflow builds with --profile dist to keep fat LTO + single codegen unit.
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
[profile.release]now uses thin LTO and default codegen units for fast local release builds.[profile.dist]inheritsreleasewith fat LTO +codegen-units = 1(the old settings).release.ymlbuilds with--profile distand copies binaries fromtarget/<triple>/dist/(Unix + Windows).Numbers (clean workspace build, macOS)
cargo build --releaseTrade-off: local
--releasebinaries are ~60% larger (d7s 8.2MB → 13.5MB). Release artifacts unaffected.Test plan
cargo build --profile dist -p p7sbuilds locallycpfor d7s, c8s, p7s onaarch64-apple-darwin: paths resolvedistbinary sizes match oldreleasewithin 32 bytes (d7s 8220240 vs 8220208, c8s 3104496 vs 3104480, p7s 1088272 vs 1088288)Copy-Itempath and Linux targets: verified on next tag