[PATCH] Restructure the propagation of -fPIC/-fPIE.
Sean Silva via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 22 17:28:39 PDT 2016
-def fpie : Flag<["-"], "fpie">, Group<f_Group>;
+def fpie : Flag<["-"], "fpie">, Group<f_Group>, Flags<[CC1Option]>;
I don't think this is the right solution as "-fpie" doesn't mean the same
thing to the driver and CC1 is sort of confusing (in CC1 it doesn't mean
anything by itself). Can you change the existing `-pie-level` Separate to
be a CC1-only `-pic-is-pie` Flag? (name is a bikeshed)
With that, this LGTM. Nice cleanup!
-- Sean Silva
On Tue, Jun 21, 2016 at 3:53 PM, Rafael Espíndola <
cfe-commits at lists.llvm.org> wrote:
> The PIC and PIE levels are not independent. In fact, if PIE is defined
> it is always the same as PIC.
> This is clear in the driver where ParsePICArgs returns a PIC level and
> a IsPIE boolean. Unfortunately that is currently lost and we pass two
> redundant levels down the pipeline.
> This patch keeps a bool and a PIC level all the way down to codegen. I
> intend to send a patch for LLVM tomorrow so that CodeGen too can be
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits