[patch] Forward all -f* options to -cc1

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Sep 28 09:40:04 PDT 2013

> I really disagree with the direction of this patch.
> Currently we have succeeded at factoring all of the GCC '-f' flag-spelling
> compatibility into the driver, and keeping it out of the frontend. I would
> personally rather keep it that way, and have a much more constrained and
> justified command line flag interface at the CC1 boundary. I find this
> separation of concerns extremely useful.

If the -cc1 option handling can be made *really* simple, I would be ok
with it. By really simple I mean something like "all boolean options
default to false, the driver just passes a list of flags to enable".

In any case, the main intention of this patch work is avoid the code
duplication/bugs when handling a -f/-fno- pair, so it can be done in
the driver too.

The attached patch is the driver version of the previous one. The next
steps are somewhat similar: Start a .td file with simple definitions
for f flags. Use tablegen to produce an enum of all flags and matching
code. The translation to -cc1 options and the logic in -cc1 itself
would remain manual for now.


More information about the cfe-commits mailing list