-
-
Notifications
You must be signed in to change notification settings - Fork 594
feat: allow custom platform when overriding #2880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rickeylev
merged 17 commits into
bazel-contrib:main
from
rickeylev:feat.custom.toolchain.override
May 29, 2025
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9bc930d
feat: allow custom platform when overriding
rickeylev a511e65
checkpoint: got host-compatible searching working, but now have 3 via…
rickeylev d428325
checkpoint: sort of works, but repo backend name is off i think
rickeylev 32c1c2e
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev ca2b07c
reimpl
rickeylev 64a2f4b
cleanup
rickeylev 3c40804
toolchain ordering: something wrong with it
rickeylev b38053f
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev a0cb8ed
move platform overrides first in platform ordering
rickeylev cc8a5cb
cleanup
rickeylev 6536df0
cleanup
rickeylev cf0d142
cleanup
rickeylev 0ae725d
skip custom runtime test on workspace, its bzlmod only feature
rickeylev 9dcb2f2
cleanup
rickeylev 316c53a
address review comments: parse version, move if/else, fix doc, remove…
rickeylev 27a1e61
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev 636c3c8
Merge branch 'main' of https://github.com/bazel-contrib/rules_python …
rickeylev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"""Helper to define a struct used to define platform metadata.""" | ||
|
||
def platform_info( | ||
*, | ||
compatible_with = [], | ||
flag_values = {}, | ||
target_settings = [], | ||
os_name, | ||
arch): | ||
"""Creates a struct of platform metadata. | ||
|
||
This is just a helper to ensure structs are created the same and | ||
the meaning/values are documented. | ||
|
||
Args: | ||
compatible_with: list[str], where the values are string labels. These | ||
are the target_compatible_with values to use with the toolchain | ||
flag_values: dict[str|Label, Any] of config_setting.flag_values | ||
compatible values. DEPRECATED -- use target_settings instead | ||
target_settings: list[str], where the values are string labels. These | ||
are the target_settings values to use with the toolchain. | ||
os_name: str, the os name; must match the name used in `@platfroms//os` | ||
rickeylev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
arch: str, the cpu name; must match the name used in `@platforms//cpu` | ||
|
||
Returns: | ||
A struct with attributes and values matching the args. | ||
""" | ||
return struct( | ||
compatible_with = compatible_with, | ||
flag_values = flag_values, | ||
target_settings = target_settings, | ||
os_name = os_name, | ||
arch = arch, | ||
) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.