[cfe-users] Controlling generation of coverage symbols
nlewycky at google.com
Mon Oct 27 01:26:25 PDT 2014
On 27 October 2014 00:57, Artur Szostak <aszostak at partner.eso.org> wrote:
> >> Is there any way to control how the symbols related to code coverage
> such as _llvm_gcov_init are created?
> >> Specifically can they be disabled? or forced? or made to be
> > Disabling code coverage will disable creation of these symbols. Beyond
> that, we don't offer fine grained control
> > over them. Why do you ask?
> Thanks you for the information.
> Just one additional question, am I correct to understand that the code for
> _llvm_gcov_init is implicitly injected into the binary? The reason I ask is
> there are some posts floating around online talking about linking against
> libprofile_rt.a. But I suspect this is not relevant.
We do not inject the functions into the binary, only calls to them. The
definitions are in libprofile_rt.a as you suspect, which is part of the
compiler-rt project. Clang adds that to the link if you pass the coverage
flags when linking.
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users