Repository navigation
biome: thin LTO under the detbuild shim instead of fat LTO - #1740
Open
bryan-minimal wants to merge 1 commit into
Open
bryan-minimal wants to merge 1 commit into
bryan-minimal wants to merge 1 commit into
Conversation
Upstream's .cargo/config.toml sets [profile.release] lto = true, which runs the whole crate graph's final optimisation on one core (~32/25 min on the build-bot). Override it to thin LTO, add v0 mangling, fetch crates first, and run the now-offline build under packages/detbuild, the codex recipe (#1713). build.sh echoes the binary's sha256 so two builds can be compared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 48 minutes for your next included review. View limit details
|
Member
Author
|
Build-bot |
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.
What
Upstream biome's
.cargo/config.tomlsets[profile.release] lto = true(fat LTO). Fat LTO runs the final optimisation of the whole crate graph on one core. This PR:CARGO_PROFILE_RELEASE_LTO=thin(codegen units stay at cargo's default);-C symbol-mangling-version=v0, which codex, nushell and zola also use for reproducibility;cargo fetch --lockedfirst, then the offlinecargo build --frozenunderpackages/detbuild(LD_PRELOAD=/usr/lib/minimal/libdetbuild.so), as codex does (codex: drop codegen-units=1 (reproducible via the entropy shim), strip, link system sqlite/zstd/oniguruma/bzip2, skip the rusty_v8 fetch #1713);The CVE-2026-111943 lock patch and its checks,
BIOME_VERSION, and--remap-path-prefixare unchanged.Why
biome takes about 32 min (one arch) and 25 min (the other) on the build-bot. Most of that is the serial fat-LTO link.
Build time
Build-bot numbers come from res-server's
wall_s/cpu_lower_bound_sjournal fields. The baseline is main's builds from the last 2 days; this PR's are from run e4e1ce24.Reproducibility evidence
I ran two clean local
--rebuilds, each in a freshly activated session (arm64):d55f45796bc0daa22c2c2e3a2dfe0bf5a837f43353606679bd3b4ea28ce5b66a, 193,544,520 Bd55f45796bc0daa22c2c2e3a2dfe0bf5a837f43353606679bd3b4ea28ce5b66a, 193,544,520 BThe two binaries are byte-identical.
The artifact is about 30% larger, which is the usual cost of thin LTO compared with fat LTO.
Runtime trade-off
Fat LTO usually gives a binary a few percent faster than thin LTO. For a linter/formatter CLI, that is worth less than a build several times faster, so this PR accepts it, as #1713 did for codex.
🤖 Generated with Claude Code