<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">http://pastebin.com/QWagJpsW</a><br></div><div><br></div><div>Any help is appreciated</div><div><br></div><div>/Eric</div><div><br></div></div>