@@ -220,6 +220,8 @@ def swift_c_library(**kwargs):
220220
221221 kwargs ["tags" ] = [LIBRARY ] + kwargs .get ("tags" , [])
222222
223+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
224+
223225 native .cc_library (** kwargs )
224226
225227def swift_cc_library (** kwargs ):
@@ -271,6 +273,8 @@ def swift_cc_library(**kwargs):
271273
272274 kwargs ["tags" ] = [LIBRARY ] + kwargs .get ("tags" , [])
273275
276+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
277+
274278 native .cc_library (** kwargs )
275279
276280def swift_c_tool_library (** kwargs ):
@@ -313,6 +317,8 @@ def swift_c_tool_library(**kwargs):
313317
314318 kwargs ["copts" ] = copts + c_standard + kwargs .get ("copts" , [])
315319
320+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
321+
316322 native .cc_library (** kwargs )
317323
318324def swift_cc_tool_library (** kwargs ):
@@ -358,6 +364,8 @@ def swift_cc_tool_library(**kwargs):
358364
359365 kwargs ["copts" ] = copts + cxxopts + kwargs .get ("copts" , [])
360366
367+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
368+
361369 native .cc_library (** kwargs )
362370
363371def swift_c_binary (** kwargs ):
@@ -404,6 +412,8 @@ def swift_c_binary(**kwargs):
404412
405413 kwargs ["tags" ] = [BINARY ] + kwargs .get ("tags" , [])
406414
415+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
416+
407417 native .cc_binary (** kwargs )
408418
409419def swift_cc_binary (** kwargs ):
@@ -568,6 +578,8 @@ def swift_cc_test_library(**kwargs):
568578
569579 kwargs ["target_compatible_with" ] = kwargs .get ("target_compatible_with" , []) + _test_compatible_with ()
570580
581+ kwargs ["linkstatic" ] = kwargs .get ("linkstatic" , True )
582+
571583 native .cc_library (** kwargs )
572584
573585def swift_cc_test (name , type , ** kwargs ):
0 commit comments