<div dir="ltr">I've submitted the -whole-archive change as r205012.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 28, 2014 at 11:42 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This does not help. <div>For asan&co we solve the same problem by adding -whole-archive/-no-whole-archive around the library in the linker command.</div>
<div><br></div><div>--kcc </div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 8:20 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Author: dexonsmith<br>
Date: Thu Mar 27 11:20:02 2014<br>
New Revision: 204939<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=204939&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=204939&view=rev</a><br>
Log:<br>
InstrProf: Pull in runtime on non-Darwin<br>
<br>
r204379 changed the way the profile runtime gets pulled in, but missed<br>
updating non-Darwin targets.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=204939&r1=204938&r2=204939&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=204939&r1=204938&r2=204939&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Mar 27 11:20:02 2014<br>
@@ -1807,6 +1807,13 @@ static void addProfileRT(<br>
         Args.hasArg(options::OPT_coverage)))<br>
     return;<br>
<br>
+  // Pull in runtime for -fprofile-inst-generate.  This is required since there<br>
+  // are no calls to the runtime in the code.<br>
+  if (Args.hasArg(options::OPT_fprofile_instr_generate)) {<br>
+    CmdArgs.push_back("-u");<br>
+    CmdArgs.push_back("___llvm_profile_runtime");<br>
+  }<br>
+<br>
   SmallString<128> LibProfile = getCompilerRTLibDir(TC);<br>
   llvm::sys::path::append(LibProfile,<br>
       Twine("libclang_rt.profile-") + getArchNameForCompilerRTLib(TC) + ".a");<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div>