Skip to content

Commit b9977aa

Browse files
committed
Do not handle .rmeta files as object
1 parent 071a9ef commit b9977aa

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.github/.cspell/project-dictionary.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ nextest
1414
notcovered
1515
profdata
1616
profraw
17+
rmeta
1718
rustfilt
1819
TESTNAME
1920
trybuild

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
1010

1111
## [Unreleased]
1212

13+
- Fix "The file was not recognized as a valid object file" error with `--doc`/`--doctests` flag on WSL. ([#343](https://github.com/taiki-e/cargo-llvm-cov/pull/343))
14+
1315
## [0.6.2] - 2024-01-18
1416

1517
- Support setting file name of `LLVM_PROFILE_FILE`. ([#340](https://github.com/taiki-e/cargo-llvm-cov/pull/340))

src/main.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,8 @@ fn object_files(cx: &Context) -> Result<Vec<OsString>> {
709709
let ext = f.extension().unwrap_or_default();
710710
// is_executable::is_executable doesn't work well on WSL.
711711
// https://github.com/taiki-e/cargo-llvm-cov/issues/316
712-
if ext == "d" {
712+
// https://github.com/taiki-e/cargo-llvm-cov/issues/342
713+
if ext == "d" || ext == "rmeta" {
713714
return false;
714715
}
715716
if cx.ws.target_for_config.triple().contains("-windows")

0 commit comments

Comments
 (0)