1212
1313load ("//tools:stamp_file.bzl" , "stamp_file" )
1414load (":utils.bzl" , "construct_local_include" )
15- load (":copts.bzl" , "DEFAULT_COPTS" , "GCC6_COPTS" )
15+ load (":copts.bzl" , "DEFAULT_COPTS" , "GCC5_COPTS" , " GCC6_COPTS" )
1616load (":cc_static_library.bzl" , _cc_static_library = "cc_static_library" )
1717
1818# Name for a unit test
@@ -49,6 +49,7 @@ def _cxx_standard(default, override):
4949def _common_cc_opts (nocopts , pedantic = False ):
5050 return select ({
5151 Label ("//cc/constraints:gcc-6" ): [copt for copt in GCC6_COPTS if copt not in nocopts ],
52+ Label ("//cc/constraints:gcc-5" ): [copt for copt in GCC5_COPTS if copt not in nocopts ],
5253 "//conditions:default" : [copt for copt in DEFAULT_COPTS if copt not in nocopts ],
5354 }) + ["-pedantic" ] if pedantic else []
5455
@@ -137,7 +138,7 @@ def cc_stamped_library(name, out, template, hdrs, includes, defaults, visibility
137138 visibility = visibility ,
138139 )
139140
140- def cc_static_library (name , deps ):
141+ def cc_static_library (name , deps , visibility = [ "//visibility:private" ] ):
141142 _cc_static_library (
142143 name = name ,
143144 deps = deps ,
@@ -146,6 +147,7 @@ def cc_static_library(name, deps):
146147 "@platforms//os:macos" : ["@platforms//:incompatible" ],
147148 "//conditions:default" : [],
148149 }),
150+ visibility = visibility ,
149151 )
150152
151153def swift_c_library (** kwargs ):
0 commit comments