<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 10:02 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.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"><div style="word-wrap:break-word"><br><div><span class="gmail-"><blockquote type="cite"><div>On May 31, 2016, at 10:00 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:</div><br><div><br><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Tue, May 31, 2016 at 9:47 AM, Mehdi Amini<span> </span><span dir="ltr"><<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>></span><span> </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"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On May 31, 2016, at 9:42 AM, Teresa Johnson <<a href="mailto:tejohnson@google.com">tejohnson@google.com</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 24, 2016 at 4:01 PM, Duncan P. N. Exon Smith<span> </span><span dir="ltr"><<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>></span><span> </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">This seems strange to me.  For example, it breaks the otherwise very convenient:<br>--<br>$ clang -flto t.c -mllvm -some-internal-option-for-cc1<br>--<br></blockquote><div><br></div><div>What is an example mllvm option that is passed to cc1 that would be illegal to pass via the gold-plugin - it isn't just ignored?</div></div></div></div></div></blockquote><div><br></div></span><div>I believe it is not about being "illegal" but rather being surprised by some unintended behavior, and losing the ability to control what options is applied during link compared to the cc1-optimizations phase.</div></div></div></blockquote><div><br></div><div>But if I did a vanilla -O2 build and passed -mllvm it would be passed down to the optimization pipeline. I find the reverse (it isn't when I do -O2 -flto) more surprising.</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"><div style="word-wrap:break-word"><div><span><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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>I don't understand how it's better.<br></blockquote><div><br></div><div>Another issue with the current situation is that in order to pass these to llvm in LTO builds (at least for gold) you have to do -Wl,-plugin-opt,-mllvm,-some-option, and gold gives a fatal error if it sees a -plugin-opt without -plugin. So for example in a clang LTO bootstrap I cannot set it up to pass any -mllvm option via plugin-opt because there are link steps that create intermediate shared libraries but don't invoke the plugin, so I get a fatal error (this affects all plugin-opt, but -mllvm is probably a likely one that I would want to pass for debugging or analysis).</div></div></div></div></div></blockquote><div><br></div></span><div>I'm surprised that you are building intermediate shared library during a bootstrap of clang, and even more that they're not built out of bitcode?</div></div></div></blockquote><div><br></div><div>Looks like it is compiler-rt asan code (<a href="http://libclang_rt.asan-i386.so/">libclang_rt.asan-i386.so</a>) that is not being built with LTO, which I think makes sense given that it is linked into user code not into the compiler.</div></div></div></blockquote><div><br></div></span><div>I didn't mean to have a .so that is itself bitcode (that should never happens: it does not make sense), but rather that the .so is built out of bitcode files.</div></div></div></blockquote><div><br></div><div>Confirmed that the compiler-rt files are native .o files -  Do I need to do something special to get LLVM_ENABLE_LTO to apply to compiler-rt?</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"><div style="word-wrap:break-word"><div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div></font></span><span class="gmail-"><div><br></div><div><br></div><div><br></div><br><blockquote type="cite"><div><div class="gmail_quote" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><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"><div style="word-wrap:break-word"><div><span><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div></font></span><span><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><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"><div><div><br>> On 2016-May-20, at 08:14, Mehdi AMINI via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>><br>> joker.eph added a comment.<br>><br>> I'm don't have a strong opinion, let me ask what Duncan think of that.<br>><br>><br>><span> </span><a href="http://reviews.llvm.org/D20423" rel="noreferrer">http://reviews.llvm.org/D20423</a><br>><br>><br>><br></div></div><div><div>> _______________________________________________<br>> llvm-commits mailing list<br>><span> </span><a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>><span> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br><br></div></div></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div><span style="font-family:times;font-size:inherit"><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">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">408-460-2413</a></td></tr></tbody></table></span></div></div></div></div></blockquote></span></div><br></div></blockquote></div><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br clear="all" style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><span style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">--<span> </span></span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="font-family:helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:times;font-size:inherit"><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">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">408-460-2413</a></td></tr></tbody></table></span></div></div></blockquote></span></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><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">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>