[codex] Align Bazel opt mode with Cargo release - #27482
Closed
anp-oai wants to merge 1 commit into
Closed
Conversation
anp-oai
commented
Jun 10, 2026
| build:release-binaries --compilation_mode=fastbuild | ||
| build:release-binaries --@rules_rust//rust/settings:extra_rustc_flag=-Cdebug-assertions=no | ||
| build:release-binaries --@rules_rust//rust/settings:extra_exec_rustc_flag=-Cdebug-assertions=no | ||
| # Our pinned rules_rust patch maps `opt` mode to Cargo's release profile, so |
Contributor
Author
There was a problem hiding this comment.
is it possible for us to achieve the same outcome for the production binaries without patching rules_rust? it's ok if we don't get the same subtlety in the exec configuration as we'd like
anp-oai
force-pushed
the
codex/release-rbe-07-cross-release-ci
branch
from
June 11, 2026 01:06
0e763ef to
11a1377
Compare
anp-oai
force-pushed
the
codex/release-rbe-08-cargo-opt-profile
branch
from
June 11, 2026 01:06
6f8fa2a to
f4c44f3
Compare
anp-oai
force-pushed
the
codex/release-rbe-07-cross-release-ci
branch
from
June 11, 2026 01:21
11a1377 to
3d1a9fb
Compare
anp-oai
force-pushed
the
codex/release-rbe-08-cargo-opt-profile
branch
from
June 11, 2026 01:21
f4c44f3 to
2926239
Compare
anp-oai
force-pushed
the
codex/release-rbe-07-cross-release-ci
branch
from
June 11, 2026 18:24
3d1a9fb to
fd68340
Compare
anp-oai
force-pushed
the
codex/release-rbe-08-cargo-opt-profile
branch
from
June 11, 2026 18:24
2926239 to
380f8c0
Compare
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.
Why
Bazel release binaries should use the same optimization and debug behavior as Cargo's release profile. Keeping those semantics attached to Bazel's standard
optmode avoids a second release-only flag list that can drift.What changed
Patch the pinned
rules_rustdependency so target-sideoptbuilds use Cargo-compatible optimization, ThinLTO, debug info, stripping, split debug info, and codegen-unit defaults. Exec-side build scripts and proc macros retain Cargo's cheaper build-override defaults, while explicit upstream LTO and codegen-unit settings still take precedence.Update the shared
release-binariesconfig to select onlyopt.Validation
just build-for-releaseunder RBE and produced all six release outputs.just bazel-lock-check.Stack: 8 of 8. Depends on #27456.