Skip to content

Add a release-fast profile for local builds and pull request CI - #10

Merged
geeooff merged 2 commits into
mainfrom
build/release-fast
Nov 23, 2026
Merged

geeooff merged 2 commits into
mainfrom
build/release-fast

Conversation

@geeooff

@geeooff geeooff commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What

  • Adds [profile.release-fast], which inherits release with thin LTO and 16 codegen units.
  • build.ps1 build uses it. build.ps1 release -Fast uses it for the packaging checks.
  • CI: pull requests run release -Fast. Pushes to main keep the published fat LTO release profile, so the profile a tag uses is still built after every merge. release.yml is unchanged.

Why

Fat LTO with one codegen unit merges the whole program and its dependencies into one LLVM module, which is optimized on one thread. Measured on a Ryzen 9 9950X3D (rustc 1.98, after a commit, dependencies cached):

Profile Final step Exe
release (fat, 1 CGU) 1 min 43 s 18.7 MB
fat, 16 CGU 2 min 09 s 19.5 MB
release-fast (thin, 16 CGU) 22 s 21.0 MB

rust-lld saves under a second. sccache cannot cache the bin crate. The parallel frontend is nightly-only and would not speed up LLVM anyway. The maintainer wants published releases fully optimized, so only checks use release-fast.

Checked

  • .\scripts\build.ps1 build and .\scripts\build.ps1 release -Fast pass locally (92 s end to end, of which 23 s is the optimized build).
  • The -Fast packaging prints that its exe is a check, not something to publish. -Fast is refused outside the release task.

🤖 Generated with Claude Code

Fat LTO with one codegen unit runs on a single thread (1 min 43 s after each
commit on a 16-core CPU); thin LTO with 16 units takes 22 s for an exe about
12 % larger. build.ps1 build and pull request CI (release -Fast) use it; tags
and main's CI keep the published fat LTO profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@geeooff
geeooff enabled auto-merge November 23, 2026 15:24
Pull requests restore main's cache on an exact key match and never save their own, so their release-fast dependencies were rebuilt every time. Main now builds them too after the release build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@geeooff
geeooff merged commit 6207f58 into main Nov 23, 2026
2 checks passed
@geeooff
geeooff deleted the build/release-fast branch November 23, 2026 15:52
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