Repository navigation
Document and test supported_platforms matching and compiler fallback - #941
Merged
Merged
Conversation
Signed-off-by: helly25 <6420169+helly25@users.noreply.github.com>
helly25
requested review from
dzbarsky,
fmeum,
jsharpe and
rrbutani
as code owners
November 7, 2026 15:33
Signed-off-by: helly25 <6420169+helly25@users.noreply.github.com>
Collaborator
Author
|
@3405691582 this PRs adds additional tests and documents. Any comments? |
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.
The
supported_platformssetting added in #933 needs user-facing guidance because excluding a platform can let Bazel select a different compiler.Add a README example and explain exact OS/architecture matching,
exec_os/exec_archoverrides, default validation, compiler fallback, and registration for Bzlmod and WORKSPACE.linuxanddarwinare explicit OS-wide values, not string prefixes. Architecture-specific values must use canonical keys, such asdarwin-aarch64; prefixes, wildcards, and distribution-specific keys are rejected.Add 10 regression tests calling the production matching function. Cover the README example, OS-wide and exact matches, host architecture normalization, execution-platform overrides, excluded platforms, default validation, and expected failures for invalid entries (even when another entry matches).
Validation:
//toolchain/...pass with Bazel 9.3.0 in Bzlmod mode and Bazel 7.7.2 in WORKSPACE mode, including the 10 new tests.git diff --checkpass.No production behavior changes.