[PATCH] Forward -target-feature option through to assembler.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Nov 10 06:22:52 PST 2014


>> I agree, -target-feature is a clang-specific flag and we should not use it that way.
>
> Why does the `cc1as` driver support the `-target-option` flag then? Is the main concern that I can pass -no-integrated-as and get an error from the system assembler? Must we always be compatible with the system assembler? I'm making this change in the method that collects args for the integrated assembler, so I'm uncertain why I need to worry about what GNU as does and whether this is Clang-specific (or if this was even your main concern :)) The target-feature flag isn't actually passed through to the MC layer, it's just used by the driver to build a comma-delimited feature-string which is actually passed through to MC.

The command line of -cc1 and -cc1as is considered an implementation
detail. It is just that clang forks a new process, so we have to
invent something. I would agree that it is not a very nice interface,
but that is more of a reason to keep it private :-)

In the case of -cc1as, having it take arguments that look a bit more
like the gnu as command line would probably be a good idea. If nothing
else it would simplify the implementation of -Wa,X in the driver.

Cheers,
Rafael




More information about the cfe-commits mailing list