Skip to content

Commit be2252f

Browse files
authored
Disable cc_static_library rule on macos (#58)
1 parent 9c167dc commit be2252f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

cc/defs.bzl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ load(":utils.bzl", "construct_local_include")
1515
load(":copts.bzl", "DEFAULT_COPTS", "GCC6_COPTS")
1616
load(":cc_static_library.bzl", _cc_static_library = "cc_static_library")
1717

18-
# reexport cc_static_library
19-
cc_static_library = _cc_static_library
20-
2118
# Name for a unit test
2219
UNIT = "unit"
2320

@@ -97,6 +94,17 @@ def cc_stamped_library(name, out, template, hdrs, includes, defaults, visibility
9794
visibility = visibility,
9895
)
9996

97+
def cc_static_library(name, deps):
98+
_cc_static_library(
99+
name = name,
100+
deps = deps,
101+
target_compatible_with = select({
102+
# Creating static libraries is not supported by macos yet.
103+
"@platforms//os:macos": ["@platforms//:incompatible"],
104+
"//conditions:default": [],
105+
}),
106+
)
107+
100108
def swift_c_library(**kwargs):
101109
_ = kwargs.pop("extensions", False)
102110
_ = kwargs.pop("standard", [])

0 commit comments

Comments
 (0)