Open aytey opened 2 months ago
Oh, I hadn't realise it would fail if you used a non-nightly with that flag.
Is there a way to check if the current version of rustc
supports MCDC?
Is there a way to check if the current version of
rustc
supports MCDC?
I think you can check rustc version like:
The actual error here is due to the version of llvm-cov command (-show-mcdc requires LLVM 18+), so a check like cmd!(&cx.llvm_cov, "show", "--help").read()?.contains("-show-mcdc")
might be better.
MC/DC coverage recently landed in
rustc
:but
cargo-llvm-cov
doesn't yet pass the-show-mcdc
flag tollvm-cov
, so we cannot get reports showing MC/DC coverage.This PR adds support for
-show-mcdc
tollvm-cov
when working withcargo-llvm-cov
.I checked: if
RUSTFLAGS
contains-Zcoverage-options=branch
(i.e., MC/DC is not enabled) then the reports are the same as if you didn't pass-show-mcdc
(i.e., you don't get "empty" MC/DC tables).