[PATCH] Pass -mglobal-merge as a module flag metadata.

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Mar 13 15:50:32 PDT 2015


> On 2015-Mar-13, at 15:23, Eric Christopher <echristo at gmail.com> wrote:
> 
> Hrm. What do you think about requiring that flags like this for LTO are just required to be passed on the command line rather than left in the module and subject to module merge?

Do you mean passing CodeGen flags at the link step?  This isn't
supported for LTO, at least not with ld64 on Darwin (you can hack
options through via `-mllvm`, but that's for developers).

In general this would force every linker to accept CodeGen flags which
sounds pretty strange to me.

Unless I've misunderstood?

> If so, you can just pass the option to the backend via TargetOptions which will put it on the TargetMachine and make it easy to grab for the pass manager.
> 
> Thoughts?
> 
> -eric
> 
> 
> http://reviews.llvm.org/D7968
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> 
> 





More information about the cfe-commits mailing list