Skip to content

Fix variant toolchains#1466

Merged
novas0x2a merged 1 commit intomainfrom
fix-variants
Feb 20, 2026
Merged

Fix variant toolchains#1466
novas0x2a merged 1 commit intomainfrom
fix-variants

Conversation

@novas0x2a
Copy link
Collaborator

In #1459, extra_toolchain was changed from a string to a Label. This was necessary (it's no longer safe to pass labels as strings in the post-bzlmod world) but it created a problem: the ability to do

cmake_variant(toolchain=select({"A": "footoolchain", "B": ""}))

kind of worked before, and no longer does (since "" is not a valid label). This change makes it so you can pass None instead of "" and it will do roughly what "" did.

In #1459,
`extra_toolchain` was changed from a string to a Label. This was
necessary (it's no longer safe to pass labels as strings in the
post-bzlmod world) but it created a problem: the ability to do

```
cmake_variant(toolchain=select({"A": "footoolchain", "B": ""}))
```

Kind of worked before, and no longer does (since "" is not a valid
label). This change makes it so you can pass None instead of "" and it
will do roughly what "" did.
@novas0x2a novas0x2a merged commit 16566f3 into main Feb 20, 2026
5 checks passed
@novas0x2a novas0x2a deleted the fix-variants branch February 20, 2026 09:18
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.

2 participants