Skip to content

Commit

Permalink
Set visibility for each target in foreign_cc_rule_variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jheaff1 committed Nov 30, 2022
1 parent 358577a commit bd7a6a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions foreign_cc/meson.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def _meson_impl(ctx):
ninja_data = get_ninja_data(ctx)
pkg_config_data = get_pkgconfig_data(ctx)

tools_deps = ctx.attr.tools_deps + meson_data.deps + cmake_data.deps + ninja_data.deps + pkg_config_data.deps
tools_data = [meson_data, cmake_data, ninja_data, pkg_config_data]

attrs = create_attrs(
ctx.attr,
configure_name = "Meson",
create_configure_script = _create_meson_script,
tools_deps = tools_deps,
tools_data = tools_data,
meson_path = meson_data.path,
cmake_path = cmake_data.path,
ninja_path = ninja_data.path,
Expand Down
3 changes: 3 additions & 0 deletions foreign_cc/private/transitions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ def foreign_cc_rule_variant(name, rule, toolchain, **kwargs):
foreign_cc_rule_target_name = name + "_"

tags = kwargs.pop("tags", [])
visibility = kwargs.pop("visibility", [])

rule(
name = foreign_cc_rule_target_name,
tags = tags + ["manual"],
visibility = visibility,
**kwargs
)

Expand All @@ -66,4 +68,5 @@ def foreign_cc_rule_variant(name, rule, toolchain, **kwargs):
extra_toolchains = [toolchain],
target = foreign_cc_rule_target_name,
tags = tags,
visibility = visibility,
)

0 comments on commit bd7a6a5

Please sign in to comment.