File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ package(default_visibility = ["//visibility:public"])
33exports_files ([
44 "pkg_config.bzl" ,
55 "BUILD.tmpl" ,
6+ "BUILD.empty.tmpl" ,
67])
Original file line number Diff line number Diff line change 1+ # vi: ft=bzl
2+ # Skipped on platform %{platform} by rule configuration
3+
4+ cc_library (
5+ name = "lib" ,
6+ srcs = [],
7+ hdrs = [],
8+ visibility = ["//visibility:public" ],
9+ )
10+
11+ cc_library (
12+ name = "internal_lib" ,
13+ srcs = [],
14+ visibility = ["//visibility:public" ],
15+ )
Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ def _pkg_config_impl(ctx):
137137 os_name = _get_current_platform (ctx )
138138 pkg_name = ctx .attr .pkg_name
139139 if os_name in ctx .attr .skip_platforms :
140- ctx .file ("BUILD" , "# Skipped on platform {} by rule configuration" .format (os_name ))
140+ ctx .template ("BUILD" , Label ("//:BUILD.empty.tmpl" ), substitutions = {
141+ "%{platform}" : os_name ,
142+ }, executable = False )
141143 # If we should not build on current platform, then the procedure finishes here.
142144 # We would consider this as successful.
143145 message_string = "Local lib '{}' skipped on platform {} by rule configuration" .format (pkg_name , os_name )
You can’t perform that action at this time.
0 commit comments