Commit 031862e
This is to make `rules_foreign_cc` _consumable_ with Bazel 9 where
`cc_external_rule_impl` currently fails on:
```
Error in fail: CcSharedLibraryInfo is only available in Bazel 7 or greater
```
The guard was relying on `bazel_features.globals.CcSharedLibraryInfo` to
detect provider availability.
In Bazel 9, `bazel_features` computes this via
`native.legacy_globals.CcSharedLibraryInfo`, which is `None` because the
symbol was removed from the `native` namespace.
`CcSharedLibraryInfo` has been available in `@rules_cc` since 0.1.0,
which predates the minimum `rules_cc` version required by
`rules_foreign_cc`.
Loading it directly from
`@rules_cc//cc/common:cc_shared_library_info.bzl` makes the guard
unnecessary and should satisfy all Bazel versions.
Co-authored-by: Mike Lundy <milundy@cisco.com>
1 parent 7874a4a commit 031862e
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
| 970 | + | |
974 | 971 | | |
975 | 972 | | |
976 | 973 | | |
| |||
0 commit comments