]> git.ipfire.org Git - thirdparty/ccache.git/commit
Add support for coverage (compiling for gcov)
authorAnders Björklund <anders@itension.se>
Tue, 2 Sep 2014 20:56:50 +0000 (22:56 +0200)
committerAnders Björklund <anders@itension.se>
Tue, 31 Mar 2015 19:51:37 +0000 (21:51 +0200)
commit02d3f078bd2495b8db2264ae0b2c692b4c5ba1bd
treebbe03ca0327c1ab85deaad961d52bd2075445efc
parent1032c0bb24c89bc7d7591fa39aafbce778c433f9
Add support for coverage (compiling for gcov)

Store the coverage notes (.gcno file) in the cache, next to the object.
If called on a file without actual code, like a header, then generate an
empty file in the cache to be able to separate this case from file missing.
Newer versions of gcc will generate a small file instead of not generating.

In the object file generated with -fprofile-arcs, the runtime output file
for the coverage data (.gcda file) is created from the output filename.
Make sure to hash this path to avoid cache hits with another absolute path.
Also make sure to use the source file path, since this is in the notes.
ccache.c
cleanup.c
compopt.c
test.sh
test/test_compopt.c