Skip to content

Commit d1c6360

Browse files
committed
refactor: migrate Starlark files to explicit rules_cc imports
Bazel 9 removes native.cc_* and CcInfo from global scope. Update: - swift/rules.bzl: Add cc_binary, cc_library, CcInfo imports; use explicit cc_binary/cc_library instead of native.cc_* - misc/bazel/cmake/cmake.bzl: Add CcInfo import for provider usage
1 parent 578efea commit d1c6360

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

misc/bazel/cmake/cmake.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
2+
13
CmakeInfo = provider(
24
fields = {
35
"name": "",

swift/rules.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
13
load("//misc/bazel:os.bzl", "os_select")
24

35
# TODO: make a shared library with the internal repos for transitions
@@ -124,7 +126,7 @@ def _wrap_cc(rule, kwargs):
124126
)
125127

126128
def swift_cc_binary(**kwargs):
127-
_wrap_cc(native.cc_binary, kwargs)
129+
_wrap_cc(cc_binary, kwargs)
128130

129131
def swift_cc_library(**kwargs):
130-
_wrap_cc(native.cc_library, kwargs)
132+
_wrap_cc(cc_library, kwargs)

0 commit comments

Comments
 (0)