<div class="gmail_quote">On 17 May 2011 00:45, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com">echristo@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5"><br>
On May 9, 2011, at 4:20 PM, Nick Lewycky wrote:<br>
<br>
> Recently I added support for gcov-compatible coverage analysis to compilation. The remaining missing piece is that we should link against libprofile_rt.a when we see the relevant flags in the link step.<br>
><br>
> There's currently code in the Driver which adds "-lgcov" when those flags are visible in the link step. Will it break anything for anyone if I remove that? Consider the case where someone uses clang to build fortran by running gfortran and it emits a calls to libgcov that is then linked by clang?<br>


><br>
> Then I'd like to add in "-l:libprofile_rt.a". I know how gcc puts libgcov, but how do we ship libraries alongside clang? Does clang pass library search path flags to the linker?<br>
><br>
> If we can't remove -lgcov because of some reason, can we pass both -lgcov and "-l:profile_rt.a"? What about people without gcc installed?<br>
<br>
</div></div>I can't see why we can't remove the gcov one. At any rate the symbols generated, afaict, are going to have llvm_ prefixed on them and so we'd need the libprofile_rt ones anyhow.<br></blockquote><div>

<br></div><div>Sounds good. I've gone ahead and implemented this in the attached patch. Good to commit?</div><div><br></div><div>Nick</div><div><br></div></div>