<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 18, 2016 at 5:35 PM, David Li <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">davidxl added a comment.<br>
<br>
How about the following solution:<br>
<br>
1. in second link, force referencing symbols that are marked as prevailing definitions<br></blockquote><div><br></div><div>Where/how would we add the references?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
or<br>
<br>
2. for distributed build mode, do not even do prevailing symbol selection in the first link. The side effect is the same as what this patch does -- slightly increased object file size (not the final binary size).<br></blockquote><div><br></div><div>We are in essence doing that though with this patch - ignoring the prevailing selection from the standpoint of the linkonce/weak resolution/optimization. I don't think it otherwise helps to prevent the linker from selecting prevailing copy in the first link (ThinLink). I don't think the prevailing nature of the symbols is used for anything else in the ThinLink (since with thinlto_index_only we exit immediately after producing the indexes). </div><div><br></div><div>Note that I don't think this will help the case handled by my follow on fix D22467.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D22356" rel="noreferrer" target="_blank">https://reviews.llvm.org/D22356</a><br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="font-family:times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:408-460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</div></div>