I am using Waf to build a C project and gcov
to have some test code coverage. However, Waf calls gcc
in a way that produces foo.c.1.o
from source file foo.c
that confuses gcov
when searching for the generated files:
$ gcov foo.c
$ foo.gcno:cannot open graph file
Fortunately, gcov
has the -o
option with which it is possible to specify the corresponding object file. Nevertheless, this is not convenient and executing lcov
still fails. Therefore, my questions are:
- Why does Waf rename the object files?
- How can this behaviour be disabled or ...
- How can
gcov
/lcov
work around this issue?