File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1223,10 +1223,7 @@ def construct_arguments(
12231223 # Use Bazel's standard instrumentation filter (--instrumentation_filter)
12241224 # so that only targets matching the filter get instrumented, consistent
12251225 # with how coverage works for other languages (Java, C++).
1226- # Test targets always need instrumentation since the coverage runtime
1227- # only initializes if the binary is compiled with -Cinstrument-coverage,
1228- # even when the statically linked library code was instrumented.
1229- if toolchain .coverage_supported and ctx .configuration .coverage_enabled and (crate_info .is_test or ctx .coverage_instrumented ()):
1226+ if toolchain .coverage_supported and ctx .configuration .coverage_enabled and ctx .coverage_instrumented ():
12301227 rustc_flags .add ("--codegen=instrument-coverage" )
12311228
12321229 if toolchain ._experimental_link_std_dylib :
You can’t perform that action at this time.
0 commit comments