diff --git a/.github/.cspell/project-dictionary.txt b/.github/.cspell/project-dictionary.txt index 3644ae06..c4b5c08f 100644 --- a/.github/.cspell/project-dictionary.txt +++ b/.github/.cspell/project-dictionary.txt @@ -8,6 +8,7 @@ fcoverage fprofile instrprof libhello +mcdc microkernel MSYSTEM nextest diff --git a/src/main.rs b/src/main.rs index 44475e76..9ccf5201 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1013,6 +1013,16 @@ impl Format { "-show-line-counts-or-regions", "-show-expansions", "-show-branches=count", + ]); + if cmd!(&cx.llvm_cov, "show", "--help") + .read() + .unwrap_or_default() + .contains("-show-mcdc") + { + // -show-mcdc requires LLVM 18+ + cmd.arg("-show-mcdc"); + } + cmd.args([ &format!("-Xdemangler={}", cx.current_exe.display()), "-Xdemangler=llvm-cov", "-Xdemangler=demangle",