[Patch] clang-cl: add support for /? and /help

Reid Kleckner rnk at google.com
Tue Jul 23 15:46:16 PDT 2013

LGTM, but you should get an OK from Chandler since this was basically his

On Tue, Jul 23, 2013 at 5:58 PM, Hans Wennborg <hans at chromium.org> wrote:

> On Tue, Jul 23, 2013 at 10:56 AM, Reid Kleckner <rnk at google.com> wrote:
> > I think we want to have a whitelist of "clang options" that are distinct
> > from gcc options, rather than blacklisting a troublesome few (-MD) as
> > GCCOptions.  That seemed to be the main conclusion of the discussion on
> > cfe-dev.
> I thought for a while that blacklisting "a troublesome few" would make
> for a much shorter list than whitelisting "clang options", but now
> that I look at the file again, I see that there's a very large amount
> of options that don't apply to clang-cl, and lots of conflicts too.

I've attached a new patch that does the whitelist approach, and starts
> with a pretty short whitelist. I figure we can add more stuff too it
> as needed.

I agree, I think the risk of exposing too much is greater than the risk of
exposing too little, in which case we just add it and the user can work
around it with -Xclang.

> > We obviously don't want to add Flags<[ClangOption]> to every option in
> > f_Group and f_clang_Group, so there'll have to be some tablegen magic in
> > there.
> I'm not sure we want to whitelist everything in f_Group and
> f_clang_Group, though. For example, -fapple-kext is in f_Group, which
> doesn't make sense for clang-cl. In g_clang_Group we have the
> sanitizer options, maybe we want to hold off exposing those options
> until we support them? There's also -fno-inline, which maybe we don't
> want to expose since clang-cl will have /Ob0?

Timur can probably speak more about asan support for Windows.  IMO the
sanitizers are some of the cooler clang/LLVM features available, so I'd
like to be able to get at them through this driver even if they're broken.

I imagine sanitizer integration testing on Windows is going to end up using
clang-cl so clang can be dropped into an existing build system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130723/1d9081e5/attachment.html>

More information about the cfe-commits mailing list