Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LLVM gcov #36

Closed
alexjurkiewicz opened this issue Dec 24, 2019 · 3 comments
Closed

Support LLVM gcov #36

alexjurkiewicz opened this issue Dec 24, 2019 · 3 comments

Comments

@alexjurkiewicz
Copy link

I tried running this with LLVM's gcov on macOS:

❯ fastcov --branch-coverage  --process-gcno --lcov -o main_coverage.info
gcov: Unknown command line argument '-v'.  Try: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gcov -help'
gcov: Did you mean '-a'?
gcov: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gcov -help

Does LLVM's gcov have the functionality required to support fastcov?

@RPGillespie6
Copy link
Owner

It depends on if LLVM's gcov json format uses the same schema as GNU's gcov json format. Also, there's the problem that LLVM gcov doesn't seem to have the ability to stream coverage information to stdout (a key feature of GNU gcov that fastcov relies on).

However, it looks like llvm-cov possibly already has the ability to do the same thing fastcov does, though? I could be wrong (I haven't used clang much).

At least, according to these docs, it looks like you could pass -format=lcov and -j4 (or however many cores you have). The main reason fastcov exists is that (as far as I could tell) there weren't any tools that could convert .gcna or .gcno to intermediate formats in parallel (i.e. taking advantage of all cpu cores/threads).

@RPGillespie6
Copy link
Owner

I'm going to close this issue as there are no plans to support LLVM gcov currently (unless LLVM gcov adds in stdout coverage streaming).

@jeremybettis
Copy link

I don't know about previous versions, but 15.0.0 supports llvm-cov gcov --stdout but it doesn't support --json-output. It does support the intermediate format, but gcov removed that.

Also if you request the intermediate format, then --stdout doesn't work, it always writes to .gcov files. Sigh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants