diff --git a/bazel/licenses.bzl b/bazel/licenses.bzl index 1786aae60f6..8250a8461b8 100644 --- a/bazel/licenses.bzl +++ b/bazel/licenses.bzl @@ -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(), diff --git a/bazel/proto_compile.bzl b/bazel/proto_compile.bzl index e9c1a8c1d41..6969a23e681 100644 --- a/bazel/proto_compile.bzl +++ b/bazel/proto_compile.bzl @@ -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, @@ -201,6 +204,7 @@ colocate_python_files = rule( mandatory = True, providers = [PyInfo], allow_files = True, + cfg = "exec", ), protos_include_dir = attr.string(), ),