Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/prost/private/prost.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ rust_prost_aspect = aspect(
attr_aspects = ["deps"],
attrs = {
"_collect_cc_coverage": attr.label(
default = Label("@rules_rust//util:collect_coverage"),
default = Label("@rules_rust//rust/coverage:collect_rust_coverage"),
executable = True,
cfg = "exec",
),
Expand Down Expand Up @@ -437,7 +437,7 @@ rust_prost_library = rule(
mandatory = True,
),
"_collect_cc_coverage": attr.label(
default = Label("@rules_rust//util:collect_coverage"),
default = Label("@rules_rust//rust/coverage:collect_rust_coverage"),
executable = True,
cfg = "exec",
),
Expand Down
17 changes: 17 additions & 0 deletions rust/coverage/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("//rust:defs.bzl", "rust_binary")

rust_binary(
name = "collect_rust_coverage",
srcs = ["collect_rust_coverage.rs"],
edition = "2018",
# To ensure this tool is produced deterministically, debug info
# is stripped out. On macOS, full symbol stripping is needed to
# also remove N_OSO stab entries whose timestamps and sandbox
# paths vary between builds.
rustc_flags = select({
"@platforms//os:linux": ["-Cstrip=debuginfo"],
"@platforms//os:macos": ["-Cstrip=symbols"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ _PLATFORM_ATTRS = {

_COVERAGE_ATTRS = {
"_collect_cc_coverage": attr.label(
default = Label("//util/collect_coverage"),
default = Label("//rust/coverage:collect_rust_coverage"),
executable = True,
cfg = "exec",
),
Expand Down Expand Up @@ -1308,7 +1308,7 @@ _RUST_BINARY_ATTRS = {
default = False,
doc = dedent("""\
Flag to dynamically link the standard library as a Rust dylib .so object when building this binary.

Default is false. This is often required when building a binary that depends on a Rust ABI dylib.
"""),
),
Expand Down
17 changes: 3 additions & 14 deletions util/collect_coverage/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
load("//rust:defs.bzl", "rust_binary")

rust_binary(
alias(
name = "collect_coverage",
srcs = ["collect_coverage.rs"],
edition = "2018",
# To ensure this tool is produced deterministically, debug info
# is stripped out. On macOS, full symbol stripping is needed to
# also remove N_OSO stab entries whose timestamps and sandbox
# paths vary between builds.
rustc_flags = select({
"@platforms//os:linux": ["-Cstrip=debuginfo"],
"@platforms//os:macos": ["-Cstrip=symbols"],
"//conditions:default": [],
}),
actual = "//rust/coverage:collect_rust_coverage",
deprecation = "instead use `@rules_rust//rust/coverage:collect_rust_coverage`",
visibility = ["//visibility:public"],
)
Loading