[PATCH] D20423: [Clang][LLVMGold] Passing LLVM arguments to gold plugin

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 09:47:29 PDT 2016


> On May 31, 2016, at 9:42 AM, Teresa Johnson <tejohnson at google.com> wrote:
> 
> 
> 
> On Tue, May 24, 2016 at 4:01 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com <mailto:dexonsmith at apple.com>> wrote:
> This seems strange to me.  For example, it breaks the otherwise very convenient:
> --
> $ clang -flto t.c -mllvm -some-internal-option-for-cc1
> --
> 
> 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?

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.

>  
> 
> I don't understand how it's better.
> 
> 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).

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?

-- 
Mehdi


> 
> 
> > On 2016-May-20, at 08:14, Mehdi AMINI via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> >
> > joker.eph added a comment.
> >
> > I'm don't have a strong opinion, let me ask what Duncan think of that.
> >
> >
> > http://reviews.llvm.org/D20423 <http://reviews.llvm.org/D20423>
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
> 
> 
> 
> 
> -- 
> Teresa Johnson |	 Software Engineer |	 tejohnson at google.com <mailto:tejohnson at google.com> |	 408-460-2413 <tel:408-460-2413>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160531/1a0033c7/attachment.html>


More information about the llvm-commits mailing list