Skip to content

Commit

Permalink
Add support for rustc flags to rust_proto_library
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Apr 22, 2023
1 parent f0e12c7 commit b0c4733
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions proto/proto.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ rust_proto_library = rule(
"rust_deps": attr.label_list(
doc = "The crates the generated library depends on.",
),
"rustc_flags": attr.string_list(
doc = """\
List of compiler flags passed to `rustc`.
These strings are subject to Make variable expansion for predefined
source/output path variables like `$location`, `$execpath`, and
`$rootpath`. This expansion is useful if you wish to pass a generated
file of arguments to rustc: `@$(location //package:target)`.
""",
),
"_cc_toolchain": attr.label(
default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"),
),
Expand Down Expand Up @@ -388,6 +398,16 @@ rust_grpc_library = rule(
"rust_deps": attr.label_list(
doc = "The crates the generated library depends on.",
),
"rustc_flags": attr.string_list(
doc = """\
List of compiler flags passed to `rustc`.
These strings are subject to Make variable expansion for predefined
source/output path variables like `$location`, `$execpath`, and
`$rootpath`. This expansion is useful if you wish to pass a generated
file of arguments to rustc: `@$(location //package:target)`.
""",
),
"_cc_toolchain": attr.label(
default = "@bazel_tools//tools/cpp:current_cc_toolchain",
),
Expand Down

0 comments on commit b0c4733

Please sign in to comment.