[Patch] Add a cl.exe compatible driver mode

Hans Wennborg hans at chromium.org
Fri Jul 19 11:51:42 PDT 2013


On Fri, Jul 19, 2013 at 11:39 AM, Reid Kleckner <rnk at google.com> wrote:
> +  /// Whether the drvier was invoked as a C++ compiler
> +  /// (e.g. clang++ or clang-cl).
> +  bool CCCIsCXX() const { return Mode == GXXMode || Mode == CLMode; }
>
> Looks good, but what needs this?  My understanding is that all of clang, cl,
> and gcc can be invoked on .c or .cpp files and they will auto-detect the
> language from the extension.  The main behavior difference is whether to
> link the standard C++ library.

I think the mode overrides the auto-detection though, e.g. "clang++
a.c" will treat the file as c++ (and warn about it).

Checking for CLMode here probably doesn't make sense actually, I'll revert it.

New patch attached.

 - Hans

> On Fri, Jul 19, 2013 at 2:31 PM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> Hi all,
>>
>> The attached patch adds a cl.exe compatible mode to the driver. It
>> doesn't actually do anything yet, but the plan is to make it accept
>> cl.exe style command line flags as discussed in [1].
>>
>> Please take a look!
>>
>> Thanks,
>> Hans
>>
>> [1]. http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030439.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl-mode2.patch
Type: application/octet-stream
Size: 4273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130719/7a01633b/attachment.obj>


More information about the cfe-commits mailing list