<div dir="ltr">This was also committed after being sent for review but without being approved, which goes against policy. Please revert.<div><br></div><div>Peter</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 11, 2018 at 12:20 PM, Roman Lebedev via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Test?<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Jul 11, 2018 at 10:13 PM, Bill Wendling via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: void<br>
> Date: Wed Jul 11 12:13:26 2018<br>
> New Revision: 336838<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=336838&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=336838&view=rev</a><br>
> Log:<br>
> gold: Add ability to toggle function/data sections<br>
><br>
> Some programs (e.g. Linux) aren't able to handle function/data sections when<br>
> LTO is used. Thus they need a way to disable it. That can be done with these<br>
> plugin options:<br>
><br>
>     -plugin-opt=-function-<wbr>sections=0<br>
>     -plugin-opt=-data-sections=0<br>
><br>
> Modified:<br>
>     llvm/trunk/tools/gold/gold-<wbr>plugin.cpp<br>
><br>
> Modified: llvm/trunk/tools/gold/gold-<wbr>plugin.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=336838&r1=336837&r2=336838&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/tools/gold/<wbr>gold-plugin.cpp?rev=336838&r1=<wbr>336837&r2=336838&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- llvm/trunk/tools/gold/gold-<wbr>plugin.cpp (original)<br>
> +++ llvm/trunk/tools/gold/gold-<wbr>plugin.cpp Wed Jul 11 12:13:26 2018<br>
> @@ -834,9 +834,11 @@ static std::unique_ptr<LTO> createLTO(In<br>
>    // FIXME: Check the gold version or add a new option to enable them.<br>
>    Conf.Options.<wbr>RelaxELFRelocations = false;<br>
><br>
> -  // Enable function/data sections by default.<br>
> -  Conf.Options.FunctionSections = true;<br>
> -  Conf.Options.DataSections = true;<br>
> +  // Toggle function/data sections.<br>
> +  if (FunctionSections.<wbr>getNumOccurrences() == 0)<br>
> +    Conf.Options.FunctionSections = true;<br>
> +  if (DataSections.<wbr>getNumOccurrences() == 0)<br>
> +    Conf.Options.DataSections = true;<br>
><br>
>    Conf.MAttrs = MAttrs;<br>
>    Conf.RelocModel = RelocationModel;<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div>