Skip to content

Commit

Permalink
[build/sysroots] Cleanup targets being built for "target" cfg, when t…
Browse files Browse the repository at this point in the history
…hey should be built for "exec".

Summary: There are some targets that were being built for the "target" cfg unnecessarily. This diff makes sure they're built for the "exec" cfg.

Test Plan: Should be no functional changes. Relying on existing tests.

Reviewers: zasgar, michelle, vihang

Reviewed By: zasgar, vihang

Signed-off-by: James Bartlett <[email protected]>

Differential Revision: https://phab.corp.pixielabs.ai/D12855

GitOrigin-RevId: cd3f0ad3cac4df670442edebd359dddb536333e7
  • Loading branch information
JamesMBartlett authored and copybaranaut committed Jan 26, 2023
1 parent 62278c1 commit d0e38da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bazel/licenses.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fetch_licenses = rule(
implementation = _fetch_licenses_impl,
attrs = dict({
"disallow_missing": attr.bool(),
"fetch_tool": attr.label(mandatory = True, allow_single_file = True),
"fetch_tool": attr.label(mandatory = True, allow_single_file = True, cfg = "exec"),
"manual_licenses": attr.label(mandatory = True, allow_single_file = True),
"out_found": attr.output(mandatory = True),
"out_missing": attr.output(),
Expand Down
4 changes: 4 additions & 0 deletions bazel/proto_compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def pl_py_grpc_library(name, proto, deps = [], **kwargs):
name = codegen_py_grpc_target,
srcs = [proto],
deps = [codegen_py_pb_target],
target_compatible_with = [
"//bazel/cc_toolchains:is_exec_true",
],
)
py_library(
name = name,
Expand Down Expand Up @@ -201,6 +204,7 @@ colocate_python_files = rule(
mandatory = True,
providers = [PyInfo],
allow_files = True,
cfg = "exec",
),
protos_include_dir = attr.string(),
),
Expand Down

0 comments on commit d0e38da

Please sign in to comment.