Skip to content

build: use thin LTO for release, add dist profile for shipped binaries - #136

Merged
robertazzopardi merged 1 commit into
mainfrom
build/faster-release
Nov 19, 2026
Merged

robertazzopardi merged 1 commit into
mainfrom
build/faster-release

Conversation

@robertazzopardi

@robertazzopardi robertazzopardi commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • [profile.release] now uses thin LTO and default codegen units for fast local release builds.
  • New [profile.dist] inherits release with fat LTO + codegen-units = 1 (the old settings).
  • release.yml builds with --profile dist and copies binaries from target/<triple>/dist/ (Unix + Windows).

Numbers (clean workspace build, macOS)

Build Before After
cargo build --release 105s 78s
Shipped binaries fat LTO fat LTO (unchanged)

Trade-off: local --release binaries are ~60% larger (d7s 8.2MB → 13.5MB). Release artifacts unaffected.

Test plan

  • cargo build --profile dist -p p7s builds locally
  • Ran the workflow's exact build + unix package cp for d7s, c8s, p7s on aarch64-apple-darwin: paths resolve
  • dist binary sizes match old release within 32 bytes (d7s 8220240 vs 8220208, c8s 3104496 vs 3104480, p7s 1088272 vs 1088288)
  • Windows Copy-Item path and Linux targets: verified on next tag

Local release builds drop from ~105s to ~78s. GitHub release workflow
builds with --profile dist to keep fat LTO + single codegen unit.
@robertazzopardi
robertazzopardi merged commit 608987f into main Nov 19, 2026
7 checks passed
@robertazzopardi
robertazzopardi deleted the build/faster-release branch November 19, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant