Skip to content

[build] drop RBE flags that Bazel 9 no longer honours and the misdirected cc autodetect override - #18156

Merged
titusfortner merged 2 commits into
trunkfrom
build-rbe-cc-cleanup
Oct 12, 2026
Merged

titusfortner merged 2 commits into
trunkfrom
build-rbe-cc-cleanup

Conversation

@titusfortner

Copy link
Copy Markdown
Member

🔗 Related Issues

Follows up #17622 — @shs96c asked whether the regenerated toolchain made some of the bazelrc cc entries redundant

💥 What does this PR do?

  • Removes the RBE config flags Bazel 9 no longer honours: --crosstool_top, --incompatible_enable_cc_toolchain_resolution (from .bazelrc too), and three that now match Bazel's defaults
  • Removes --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1, which never took effect: that variable is read by the cc_configure repository rule, which --action_env does not reach

🔧 Implementation Notes

  • Verified with cquery --toolchain_resolution_debug under --config=rbe that the RBE toolchain still resolves to cc-compiler-k8 through --extra_toolchains and output paths stay in k8-fastbuild; a bogus --crosstool_top changes nothing while a bogus --extra_toolchains fails resolution
  • --cpu=k8 / --host_cpu=k8 stay: without them a Mac-launched --config=rbe build writes to darwin_arm64-fastbuild and stops sharing remote cache keys with CI
  • --cxxopt=-std=c++17 in .bazelrc stays because local builds use toolchains that do not carry it; the RBE toolchain's cxx_flags only applies on RBE
  • Dropping the action env var changes every remote action key, so the first RBE run on this branch is a cold one

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Fable 5.1)
    • What was generated: the flag-by-flag analysis, the cquery verification, and this description
    • I reviewed all AI output and can explain the change

🔄 Types of changes

  • Cleanup (formatting, renaming)

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Oct 12, 2026
@qodo-code-review

qodo-code-review Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 8411496 ⏭️ Skipped

Results up to commit fef63b7 ⚖️ Balanced


No changes from previous review

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Remove obsolete Bazel 9 RBE flags and ineffective C++ override

⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Removes obsolete RBE flags and a C++ autodetection override that never reached its repository
 rule.
• Keeps platform, toolchain, and CPU settings needed for remote resolution and consistent cache
 paths.
• Removing the action environment variable changes remote action keys, causing an initial cold-cache
 run.
Diagram

graph TD
  A["RBE config"] --> B["Remote platform"] --> C["Toolchain resolution"] --> D["C++ compiler"]
  A --> E["k8 output path"] --> F["Remote cache"]
Loading
High-Level Assessment

Keep the focused flag removal. The existing platform and extra-toolchain registration provide C++ selection, while the CPU flags preserve cross-host output paths; retaining the ineffective overrides would add confusion without changing resolution.

Files changed (2) +1 / -9

Other (2) +1 / -9
.bazelrcRemove obsolete global C++ toolchain-resolution flag +0/-1

Remove obsolete global C++ toolchain-resolution flag

• Removes the Bazel 9-obsolete C++ toolchain-resolution flag. Leaves the C++17 options in place for local toolchains.

.bazelrc

.bazelrc.remoteSimplify RBE flags while retaining cache-compatible CPU settings +1/-8

Simplify RBE flags while retaining cache-compatible CPU settings

• Removes ignored or default-equivalent flags, the legacy crosstool selection, and an action-environment override that could not affect C++ repository-rule autodetection. Keeps platform and extra-toolchain selection, and explains why both k8 CPU flags remain. Removing the action environment variable changes remote action keys.

.bazelrc.remote

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 8411496

@titusfortner

Copy link
Copy Markdown
Member Author

last commit was just fixing the comment. Merging.

@titusfortner
titusfortner merged commit fd43957 into trunk Oct 12, 2026
29 checks passed
@titusfortner
titusfortner deleted the build-rbe-cc-cleanup branch October 12, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo