Repository navigation
agent-browser: drop codegen-units=1 and fat LTO; build under detbuild - #1743
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
…/detbuild RUSTFLAGS forced -C codegen-units=1 on every crate on top of upstream's fat LTO / cgu=1 release profile, so the Rust build ran on one core. Build at thin LTO over 16 units with v0 mangling, fetch crates first, and run the offline build under packages/detbuild, the codex recipe (#1713). The dashboard build is not under the shim. 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
agent-browser's Rust build ran on one core. RUSTFLAGS forced
-C codegen-units=1on every crate, on top of upstream'scli/Cargo.tomlrelease profile (lto = true(fat),codegen-units = 1). agent-browser is one of the most often rebuilt packages, at about 118 builds in 2 weeks. This PR:-C codegen-units=1from RUSTFLAGS;CARGO_PROFILE_RELEASE_LTO=thinandCARGO_PROFILE_RELEASE_CODEGEN_UNITS=16;-C symbol-mangling-version=v0, as codex / nushell / zola use;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 dashboard (pnpm / Next.js) build is not under the shim;CONST_RANDOM_SEED=0, the Next.jsgenerateBuildIdpin,--remap-path-prefix, and upstreamstrip = trueare unchanged.This is independent of #1716 (the 0.45.0 bump): the two touch different lines, and the release profile is the same at 0.44.0 and 0.45.0.
Why
Under the codex precedent (#1713), cgu=1 isn't needed for reproducibility once the entropy shim is in place.
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 ba23da9f. Both include the dashboard build.Reproducibility evidence
I ran two clean local
--rebuilds, each in a freshly activated session (arm64):b6adcd5a282ba319794a69550354fa11f09c6f33cc02d31f5eee5fbdc266a0c2, 24,779,312 Bb6adcd5a282ba319794a69550354fa11f09c6f33cc02d31f5eee5fbdc266a0c2, 24,779,312 BThe two binaries are byte-identical, with the dashboard embedded.
Runtime trade-off
Fat LTO with cgu=1 usually gives a binary a few percent faster than thin LTO over 16 units. The CLI is mostly waiting on Chromium over CDP, so this PR accepts that.
🤖 Generated with Claude Code