forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#91207 - richkadel:rk-bump-coverage-version,…
… r=tmandry Add support for LLVM coverage mapping format versions 5 and 6 This PR cherry-pick's Swatinem's initial commit in unsubmitted PR rust-lang#90047. My additional commit augments Swatinem's great starting point, but adds full support for LLVM Coverage Mapping Format version 6, conditionally, if compiling with LLVM 13. Version 6 requires adding the compilation directory when file paths are relative, and since Rustc coverage maps use relative paths, we should add the expected compilation directory entry. Note, however, that with the compilation directory, coverage reports from `llvm-cov show` can now report file names (when the report includes more than one file) with the full absolute path to the file. This would be a problem for test results, but the workaround (for the rust coverage tests) is to include an additional `llvm-cov show` parameter: `--compilation-dir=.`
- Loading branch information
Showing
8 changed files
with
101 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
# needs-profiler-support | ||
# ignore-windows-gnu | ||
|
||
# Rust coverage maps support LLVM Coverage Mapping Format versions 5 and 6, | ||
# corresponding with LLVM versions 12 and 13, respectively. | ||
# When upgrading LLVM versions, consider whether to enforce a minimum LLVM | ||
# version during testing, with an additional directive at the top of this file | ||
# that sets, for example: `min-llvm-version: 12.0` | ||
|
||
# FIXME(mati865): MinGW GCC miscompiles compiler-rt profiling library but with Clang it works | ||
# properly. Since we only have GCC on the CI ignore the test for now. | ||
|
||
|
@@ -115,6 +121,7 @@ endif | |
"$(LLVM_BIN_DIR)"/llvm-cov show \ | ||
$(DEBUG_FLAG) \ | ||
$(LLVM_COV_IGNORE_FILES) \ | ||
--compilation-dir=. \ | ||
--Xdemangler="$(RUST_DEMANGLER)" \ | ||
--show-line-counts-or-regions \ | ||
--instr-profile="$(TMPDIR)"/[email protected] \ | ||
|