Skip to content

build: use gnullvm for Windows Rust exec tools#29149

Closed
anp-oai wants to merge 15 commits into
mainfrom
codex/windows-hermetic-exec
Closed

build: use gnullvm for Windows Rust exec tools#29149
anp-oai wants to merge 15 commits into
mainfrom
codex/windows-hermetic-exec

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Why

#29143 provides a pinned LLVM/MinGW toolchain, but Windows Bazel lint actions could still select the generic MSVC nightly for exec-side Rust tools or resolve host tools from the runner. This is the first step toward making Windows Bazel compile, proc-macro, and build-script actions hermetic.

Parent PR: #29143.

What

  • Replace the default Windows nightly registration with x86_64-pc-windows-gnullvm for both exec and target configurations, including the pinned rustc-dev components used by the lint driver.
  • Link gnullvm Rust tools through the selected hermetic Clang/MinGW toolchain. Retained MSVC declarations expose Rust's downloaded rust-lld as lld-link.exe instead of searching PATH.
  • Couple build-script producers, wrappers, and runners to the same Rust-capable execution platform, then restrict every Windows gnullvm action to local execution while eligible V8 generator, Rust host-tool, and native compilation work runs on Linux RBE with a separate action environment. Windows V8 snapshot generation remains local because it executes a target PE binary.
  • Remove the lint lane's forced MSVC host platform and forced Rust-linker preference, and make the V8 Python generator follow Bazel's exec transition.

Validation

  • Queried the generated nightly repositories to verify that the gnullvm toolchain contains rustc-dev and replaces the competing x64 MSVC registration.
  • Inspected focused aquery output to verify gnullvm rustc, the hermetic Clang driver, MinGW/UCRT/CRT inputs, matched build-script producer/runner platforms, native Windows Rust/lint execution, and Linux-only V8 host-tool/native execution.
  • Ran just bazel-lock-check and the Bazel wrapper's Python test suite.

anp-oai added a commit that referenced this pull request Jun 19, 2026
@anp-oai anp-oai marked this pull request as ready for review June 20, 2026 00:21
@anp-oai

anp-oai commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5ef24a6143

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread patches/rules_rs_windows_exec_linker.patch
Comment thread MODULE.bazel
@anp-oai anp-oai marked this pull request as draft June 20, 2026 00:42
@anp-oai anp-oai force-pushed the codex/fix-windows-ci-llvm-extraction branch from b5398ae to dc6ad5e Compare June 22, 2026 17:08
Base automatically changed from codex/fix-windows-ci-llvm-extraction to main June 22, 2026 17:26
anp-oai added a commit that referenced this pull request Jun 22, 2026
@anp-oai anp-oai force-pushed the codex/windows-hermetic-exec branch from 5fcabf0 to 8494332 Compare June 22, 2026 17:29
@anp-oai anp-oai marked this pull request as ready for review June 22, 2026 18:51
@anp-oai anp-oai requested a review from a team as a code owner June 22, 2026 18:51
@anp-oai anp-oai force-pushed the codex/windows-hermetic-exec branch from 8494332 to 871d868 Compare June 22, 2026 18:51
@anp-oai

anp-oai commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@anp-oai anp-oai marked this pull request as draft June 22, 2026 18:53
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 871d8689fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@anp-oai

anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

going to try this from the top, fixing v8 first

@anp-oai anp-oai closed this Jun 23, 2026
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