<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 9, 2014 at 10:39 PM, Eric Fiselier <span dir="ltr"><<a href="mailto:eric@efcs.ca" target="_blank">eric@efcs.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I'm working on making libc++ generate code coverage data. This means that libclang_rt.profile.x86_64.a is put into the link command before '-lc' and other dependencies.</div><div>I suspect this change in library order causes the linker errors I see while running the tests.</div><div><br></div><div>I have a couple of questions:</div><div>  - Should -ftest-coverage be passed when linking libc++?</div><div>  - Is there a way to link libclang_rt.profile.x86_64.a after the given linker flags</div><div><br></div><div><br></div><div>This file shows the ld invocation with and without -nodefaultlibs as well as the error produced when</div><div>linking tests w/ -nodefaultlibs</div><div><a href="http://pastebin.com/QWagJpsW" target="_blank">http://pastebin.com/QWagJpsW</a></div></div></blockquote><div><br></div><div>Hm? On the contrary, in the attached file  "libclang_rt.profile.x86_64.a" is listed *after* its dependencies, in particular, after "-lc".</div><div>I think this is wrong, and we should just fix it in the driver. "-nodefautlibs" shouldn't be a problem here, as you seem to add "-lc", "-lpthread"</div><div>etc. manually to your linker invocation.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div><div>Any help is appreciated</div><span class=""><font color="#888888"><div><br></div><div>/Eric</div><div><br></div></font></span></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>