gh-94759: Collect C-level coverage using llvm-cov by mdboom · Pull Request #94760 · python/cpython (original) (raw)
I don't know if using gcov for collection + llvm-cov for output would give us the best of both worlds.
It doesn't look like this is possible. There is an llvm-cov gcov
command that takes the gcc coverage data as input and outputs human-readable text file reports. But I can't find a way to use gcc coverage data and output the nice llvm-cov html reports.
@brettcannon wrote:
Maybe coverage-report should get updated to use LLVM? Or make it configurable for either clang or gcc?
@tiran wrote:
I would welcome to have LLVM coverage support in Makefile, too.
I think that's a good idea, but a fair chunk of fiddly work. The Makefile doesn't have any direct support for building with clang on Linux. It works if you set CC
, obviously, but you have to do that prior to re-running configure
. So I don't think it's possible to just have make coverage-report-llvm
work (since the Makefile can't call configure
). We could, probably, make a task that errors out if clang
isn't being used.