Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR centralizes the Windows SDK license acceptance check into the lazy-download step, adds parsing for the license-acceptance env var, and refactors a special-case toolchain naming prefix.
- Moved and simplified Windows SDK license check from
cxx_toolchainsintolazy_download_bins - Parsed
accept_winsdk_licensefrom an env var inget_config_from_env_vars - Refactored default toolchain naming logic in
toolchains_cc.bzl
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| toolchains_cc.bzl | Removed commented-out Windows license block and refactored toolchain_name handling |
| impl/declare_tools.bzl | Added Windows SDK license acceptance check in _lazy_download_bins_impl |
| impl/config.bzl | Introduced accept_winsdk_license parsing from an env var in config |
Comments suppressed due to low confidence (1)
impl/config.bzl:45
- [nitpick] New license-parsing logic should have unit tests verifying both
TrueandFalsebranches when the env var is set or unset.
accept_winsdk_license_str = rctx.getenv(accept_winsdk_license_var)
| vendor = triple.split("-")[1] | ||
| libc_version = triple.split("-")[3] | ||
|
|
||
| accept_winsdk_license_var = "{}_accept_winsdk_license".format(toolchain_name) |
There was a problem hiding this comment.
If toolchain_name is never passed in, it defaults to None, resulting in an env var named None_accept_winsdk_license. Consider defaulting toolchain_name to rctx.attr.toolchain_name or requiring it to be provided so the correct variable is read.
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.
No description provided.