Extended the integrated assembler -Wa,-defsym option to be usable with the Clang driver. Both options are handled in the same way. Using -defsym when not assembling files shows an unused argument warning.
Diff Detail
Event Timeline
lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
1882 | I wonder if you should break; here if validation fails like the original code did? |
lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
1882 | The reason for removing it is that this way, all erroneous -defsym options specified can be listed during the same invocation. This provides a better user experience than tackling them one at a time, as with the original code. |
lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
1882 | Ah, I see, thanks! |
Hi Salman,
This essentially looks good to me. I don't think I'm the right person to LGTM this however, so I've added some reviewers who might be able to have a look.
Thanks,
Sanne
-Wl,--defsym is also a pretty common linker option. I'm hesitant to add this to the driver interface, since it seems like they could easily be confused.
include/clang/Driver/Options.td | ||
---|---|---|
546 | I'm pretty sure this shouldn't be in "d_Group": def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>, DocName<"Dumping preprocessor state">, DocBrief<[{ Flags allowing the state of the preprocessor to be dumped in various ways.}]>; |
I see. Was not aware of that linker option. Having looked it up now, I agree that the risk of confusion with the linker option outweighs the convenience of having this as a Driver option. I'll adandon this revision.
I'm pretty sure this shouldn't be in "d_Group":