Skip to content

cc: register @llvm toolchains through a gated rules_dx hub (part of #12601) - #12800

Draft
TrapsterDK wants to merge 1 commit into
mainfrom
llvm-gated-hub
Draft

TrapsterDK wants to merge 1 commit into
mainfrom
llvm-gated-hub

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Adds //cc/private/toolchain/llvm, a hub that re-declares every toolchain @llvm//toolchain declares (stage0 and the stage1/2/3 bootstrap toolchains, including the _msvc variants) with //config:toolchains_on prepended to target_settings. MODULE.bazel registers //cc/private/toolchain/llvm:all instead of @llvm//toolchain:all, and patches/llvm/toolchains_gate.patch is dropped: it lived in a root-only single_version_override naming @@//config:toolchains_on, so non-root consumers got the llvm toolchains ungated. This unblocks the llvm part of #12688.

Part of #12601. Remaining: rebase #12688 on this, green --config=nested_record run, nested_cache_update --from.

Tested locally (linux_x86_64): //cc/private/toolchain/llvm:all builds, //tools/testing:module_srcs_test passes; --toolchain_resolution_debug selects the llvm cc toolchain with the flag on and rejects //cc/private/toolchain/llvm:linux_x86_64_to_linux_x86_64 on toolchains_on with --@rules_dx//config:toolchains=false. //tools/testing:toolchain_gate_test fails only on @julia_toolchains//:all, which is already on main (#12747), not from this change. Nested-Bazel and consumer tests were not run locally.

Evidence (linux_x86_64, macos_arm64): pending 43663611606.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvuiHK9vSNJZWiqKfX

…12601)

//cc/private/toolchain/llvm re-declares every @llvm//toolchain toolchain
with //config:toolchains_on, and MODULE.bazel registers it instead of
@llvm//toolchain:all, so the gate holds for non-root consumers.
patches/llvm/toolchains_gate.patch is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvuiHK9vSNJZWiqKfX
@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant