From bf6e16d0b5dab576f5f95d063b828feb033b9dbf Mon Sep 17 00:00:00 2001 From: xd009642 Date: Sat, 2 Jan 2021 11:00:51 +0000 Subject: [PATCH] Add doctest llvm coverage --- .gitignore | 1 + src/cargo.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index b88d2a8b66..3e43a75d85 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ target/ **/*.rs.bk *.log *.profraw +*.profdata # Generated by IntelliJ IDEs .idea diff --git a/src/cargo.rs b/src/cargo.rs index aa0f786692..53d674998d 100644 --- a/src/cargo.rs +++ b/src/cargo.rs @@ -463,6 +463,9 @@ pub fn rustdoc_flags(config: &Config) -> String { value.push_str(vtemp.as_ref()); } } + if supports_llvm_coverage() { + value.push_str("-Z instrument-coverage "); + } value }