[LLVMdev] undefined reference to 'llvm_gcda_start_file', 'llvm_gcda_emit_arcs', etc

Nick Lewycky nicholas at mxc.ca
Wed Mar 13 23:11:42 PDT 2013


Qun Fa wrote:
> Hi,
> I am trying to test my project and get the code coverage with a version
> of clang compiler that was built from the latest llvm/clang codebase.
>
> It worked for a while. But today, after I updated my local checkout, and
> re-build llvm, clang and compiler-rt, when I test my project again, I
> got the errors with undefined reference to 'llvm_gcda_start_file',
> 'llvm_gcda_emit_arcs', 'llvm_gcda_emit_function', and 'llvm_gcda_end_file'.
>
> I have searched the codebase, and have found the functions are defined
> in GCDAProfiling.c file, but not sure why this suddenly doesn't work for me.
>
> Anyone can give any suggestions?

Those symbols should be provided by 
compiler-rt/lib/profile/GCDAProfiling.c. There used to be a copy in 
llvm's tree, but I deleted that one recently. It's possible you used to 
be using the one from llvm, but now need to switch to using the one from 
compiler-rt?

Nick




More information about the llvm-dev mailing list