Skip to content

Commit 26426be

Browse files
authored
cc: add c stubs [BUILD-560] (#51)
Adds stubs for the incoming c rules so that we can gradually introduce the changes into the codebase without breaking the build.
1 parent d918ae3 commit 26426be

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

cc/defs.bzl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ def cc_stamped_library(name, out, template, hdrs, includes, defaults, visibility
9393
visibility = visibility,
9494
)
9595

96+
def swift_c_library(**kwargs):
97+
_ = kwargs.pop("extensions", False)
98+
_ = kwargs.pop("standard", [])
99+
swift_cc_library(**kwargs)
100+
96101
def swift_cc_library(**kwargs):
97102
"""Wraps cc_library to enforce standards for a production library.
98103
@@ -113,6 +118,10 @@ def swift_cc_library(**kwargs):
113118
nocopts: List of flags to remove from the default compile
114119
options. Use judiciously.
115120
"""
121+
_ = kwargs.pop("exceptions", False)
122+
_ = kwargs.pop("rtti", False)
123+
_ = kwargs.pop("standard", 14)
124+
116125
local_includes = _construct_local_includes(kwargs.pop("local_includes", []))
117126

118127
nocopts = kwargs.pop("nocopts", []) # pop because nocopts is a deprecated cc* attr.
@@ -127,6 +136,11 @@ def swift_cc_library(**kwargs):
127136

128137
native.cc_library(**kwargs)
129138

139+
def swift_c_tool_library(**kwargs):
140+
_ = kwargs.pop("extensions", False)
141+
_ = kwargs.pop("standard", [])
142+
swift_cc_tool_library(**kwargs)
143+
130144
def swift_cc_tool_library(**kwargs):
131145
"""Wraps cc_library to enforce standards for a non-production library.
132146
@@ -148,6 +162,10 @@ def swift_cc_tool_library(**kwargs):
148162
nocopts: List of flags to remove from the default compile
149163
options. Use judiciously.
150164
"""
165+
_ = kwargs.pop("exceptions", False)
166+
_ = kwargs.pop("rtti", False)
167+
_ = kwargs.pop("standard", 14)
168+
151169
local_includes = _construct_local_includes(kwargs.pop("local_includes", []))
152170

153171
nocopts = kwargs.pop("nocopts", [])
@@ -160,6 +178,11 @@ def swift_cc_tool_library(**kwargs):
160178

161179
native.cc_library(**kwargs)
162180

181+
def swift_c_binary(**kwargs):
182+
_ = kwargs.pop("extensions", False)
183+
_ = kwargs.pop("standard", [])
184+
swift_cc_binary(**kwargs)
185+
163186
def swift_cc_binary(**kwargs):
164187
"""Wraps cc_binary to enforce standards for a production binary.
165188
@@ -180,6 +203,10 @@ def swift_cc_binary(**kwargs):
180203
nocopts: List of flags to remove from the default compile
181204
options. Use judiciously.
182205
"""
206+
_ = kwargs.pop("exceptions", False)
207+
_ = kwargs.pop("rtti", False)
208+
_ = kwargs.pop("standard", 14)
209+
183210
local_includes = _construct_local_includes(kwargs.pop("local_includes", []))
184211

185212
nocopts = kwargs.pop("nocopts", [])
@@ -194,6 +221,11 @@ def swift_cc_binary(**kwargs):
194221

195222
native.cc_binary(**kwargs)
196223

224+
def swift_c_tool(**kwargs):
225+
_ = kwargs.pop("extensions", False)
226+
_ = kwargs.pop("standard", [])
227+
swift_cc_tool(**kwargs)
228+
197229
def swift_cc_tool(**kwargs):
198230
"""Wraps cc_binary to enforce standards for a non-production binary.
199231
@@ -215,6 +247,10 @@ def swift_cc_tool(**kwargs):
215247
nocopts: List of flags to remove from the default compile
216248
options. Use judiciously.
217249
"""
250+
_ = kwargs.pop("exceptions", False)
251+
_ = kwargs.pop("rtti", False)
252+
_ = kwargs.pop("standard", 14)
253+
218254
nocopts = kwargs.pop("nocopts", [])
219255

220256
copts = _common_c_opts(nocopts, pedantic = False)

0 commit comments

Comments
 (0)