[llvm-dev] How to add new arch for llvm-cov show?

Vedant Kumar via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 22 09:24:02 PST 2019


Hi Ruobin,

> On Jan 21, 2019, at 5:21 PM, xuruobin via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> I'm trying to support llvm-cov for a new architecture and I have successfully built compiler-rt for my arch. Following steps shown in https://clang.llvm.org/docs/SourceBasedCodeCoverage.html , I encountered an error for the last step(step of llvm-cov show). 
> The command line was (supposed my arch is XXXX)
> 
> "llvm-cov show -arch=XXXX ./foo -instr-profile=foo.profdata"
> 
> and the error was
> 
> "Failed to load coverage: No object file for requested architecture."
> 
> I think I should add my arch information to somewhere(maybe an llvm-cov support list?) but I don't know where to add these information. Can someone give me some suggestions?

You’ll need to teach libObject about this architecture. Specifically, the coverage reader checks that calling getArch() on a loaded ObjectFile matches Triple(Arch).getArch() (see loadBinaryFormat in CoverageMappingReader.cpp).

best,
vedant


> 
> Best Regards,
> Ruobin.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list