Skip to content

Commit

Permalink
Change outdated cfg = "host" to cfg = "exec".
Browse files Browse the repository at this point in the history
Preserves future Bazel compatibility:
bazelbuild/bazel#17032

Extension of grpc#32021 which missed review.
  • Loading branch information
gregestren committed Dec 8, 2023
1 parent 257efc0 commit 7379674
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bazel/generate_cc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ _generate_cc = rule(
"plugin": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "host",
cfg = "exec",
),
"flags": attr.string_list(
mandatory = False,
Expand All @@ -189,7 +189,7 @@ _generate_cc = rule(
"_protoc": attr.label(
default = Label("//external:protocol_compiler"),
executable = True,
cfg = "host",
cfg = "exec",
),
},
# We generate .h files, so we need to output to genfiles.
Expand Down
4 changes: 2 additions & 2 deletions bazel/generate_objc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ generate_objc = rule(
default = "@com_github_grpc_grpc//src/compiler:grpc_objective_c_plugin",
executable = True,
providers = ["files_to_run"],
cfg = "host",
cfg = "exec",
),
"srcs": attr.string_list(
mandatory = False,
Expand All @@ -182,7 +182,7 @@ generate_objc = rule(
"_protoc": attr.label(
default = Label("//external:protocol_compiler"),
executable = True,
cfg = "host",
cfg = "exec",
),
},
output_to_genfiles = True,
Expand Down
8 changes: 4 additions & 4 deletions bazel/python_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ _gen_py_aspect = aspect(
default = Label("//external:protocol_compiler"),
providers = ["files_to_run"],
executable = True,
cfg = "host",
cfg = "exec",
),
"_protobuf_library": attr.label(
default = Label("@com_google_protobuf//:protobuf_python"),
Expand Down Expand Up @@ -169,7 +169,7 @@ py_proto_library = rule(
default = Label("//external:protocol_compiler"),
providers = ["files_to_run"],
executable = True,
cfg = "host",
cfg = "exec",
),
"_protobuf_library": attr.label(
default = Label("@com_google_protobuf//:protobuf_python"),
Expand Down Expand Up @@ -252,13 +252,13 @@ _generate_pb2_grpc_src = rule(
"_grpc_plugin": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "host",
cfg = "exec",
default = Label("//src/compiler:grpc_python_plugin"),
),
"_protoc": attr.label(
executable = True,
providers = ["files_to_run"],
cfg = "host",
cfg = "exec",
default = Label("//external:protocol_compiler"),
),
"_grpc_library": attr.label(
Expand Down

0 comments on commit 7379674

Please sign in to comment.