@@ -4,6 +4,9 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo", "proto_common")
44load ("//proto/prost:providers.bzl" , "ProstProtoInfo" )
55load ("//rust:defs.bzl" , "rust_common" )
66
7+ # buildifier: disable=bzl-visibility
8+ load ("//rust/private:rust.bzl" , "RUSTC_ATTRS" )
9+
710# buildifier: disable=bzl-visibility
811load ("//rust/private:rustc.bzl" , "rustc_compile_action" )
912
@@ -254,53 +257,23 @@ rust_prost_aspect = aspect(
254257 implementation = _rust_prost_aspect_impl ,
255258 attr_aspects = ["deps" ],
256259 attrs = {
257- "_cc_toolchain" : attr .label (
258- doc = (
259- "In order to use find_cc_toolchain, your rule has to depend " +
260- "on C++ toolchain. See `@rules_cc//cc:find_cc_toolchain.bzl` " +
261- "docs for details."
262- ),
263- default = Label ("@bazel_tools//tools/cpp:current_cc_toolchain" ),
264- ),
265260 "_collect_cc_coverage" : attr .label (
266261 default = Label ("//util:collect_coverage" ),
267262 executable = True ,
268263 cfg = "exec" ,
269264 ),
270- "_error_format" : attr .label (
271- default = Label ("//:error_format" ),
272- ),
273- "_extra_exec_rustc_flag" : attr .label (
274- default = Label ("//:extra_exec_rustc_flag" ),
275- ),
276- "_extra_exec_rustc_flags" : attr .label (
277- default = Label ("//:extra_exec_rustc_flags" ),
278- ),
279- "_extra_rustc_flag" : attr .label (
280- default = Label ("//:extra_rustc_flag" ),
281- ),
282- "_extra_rustc_flags" : attr .label (
283- default = Label ("//:extra_rustc_flags" ),
284- ),
285265 "_grep_includes" : attr .label (
286266 allow_single_file = True ,
287267 default = Label ("@bazel_tools//tools/cpp:grep-includes" ),
288268 cfg = "exec" ,
289269 ),
290- "_process_wrapper" : attr .label (
291- doc = "A process wrapper for running rustc on all platforms." ,
292- default = Label ("//util/process_wrapper" ),
293- executable = True ,
294- allow_single_file = True ,
295- cfg = "exec" ,
296- ),
297270 "_prost_process_wrapper" : attr .label (
298271 doc = "The wrapper script for the Prost protoc plugin." ,
299272 cfg = "exec" ,
300273 executable = True ,
301274 default = Label ("//proto/prost/private:protoc_wrapper" ),
302275 ),
303- },
276+ } | RUSTC_ATTRS ,
304277 fragments = ["cpp" ],
305278 host_fragments = ["cpp" ],
306279 toolchains = [
0 commit comments