Skip to content

Commit

Permalink
Do not handle .rmeta files as object
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 24, 2024
1 parent 071a9ef commit 9db673e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nextest
notcovered
profdata
profraw
rmeta
rustfilt
TESTNAME
trybuild
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com

## [Unreleased]

- 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))

## [0.6.2] - 2024-01-18

- Support setting file name of `LLVM_PROFILE_FILE`. ([#340](https://github.com/taiki-e/cargo-llvm-cov/pull/340))
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ fn object_files(cx: &Context) -> Result<Vec<OsString>> {
let ext = f.extension().unwrap_or_default();
// is_executable::is_executable doesn't work well on WSL.
// https://github.com/taiki-e/cargo-llvm-cov/issues/316
if ext == "d" {
// https://github.com/taiki-e/cargo-llvm-cov/issues/342
if ext == "d" || ext == "rmeta" {
return false;
}
if cx.ws.target_for_config.triple().contains("-windows")
Expand Down

0 comments on commit 9db673e

Please sign in to comment.