The idea is that clang-cl should provide (most) options that cl.exe
provides, and also the set of Clang options that's not there for gcc
compatibility but can be considered "core" options, e.g. -### and
-Xclang, flags to enable the sanitizers, set diagnostics options, etc.

I don't think we want to invent a new options dialect here. clang-cl
makes it possible to use clang with existing cl.exe options, but it's
still clang, and I think existing clang options should just be spelled
the way they currently are.

 - Hans

On Mon, Aug 19, 2013 at 11:47 AM, Jordan Rose <[email protected]> wrote:
> Out of curiosity, why are you choosing to preserve -Xclang, -### instead of 
> choosing cl.exe-ish names for these? /clang, /###.
>
> Jordan
>
>
> On Aug 19, 2013, at 11:32 , Hans Wennborg <[email protected]> wrote:
>
>> Author: hans
>> Date: Mon Aug 19 13:32:59 2013
>> New Revision: 188685
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=188685&view=rev
>> Log:
>> clang-cl: Expose the -Xclang option
>>
>> Modified:
>>    cfe/trunk/include/clang/Driver/Options.td
>>    cfe/trunk/test/Driver/cl-options.c
>>
>> Modified: cfe/trunk/include/clang/Driver/Options.td
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=188685&r1=188684&r2=188685&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Driver/Options.td (original)
>> +++ cfe/trunk/include/clang/Driver/Options.td Mon Aug 19 13:32:59 2013
>> @@ -264,7 +264,7 @@ def Xassembler : Separate<["-"], "Xassem
>>   HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">;
>> def Xclang : Separate<["-"], "Xclang">,
>>   HelpText<"Pass <arg> to the clang compiler">, MetaVarName<"<arg>">,
>> -  Flags<[DriverOption]>;
>> +  Flags<[DriverOption, CoreOption]>;
>> def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, 
>> RenderAsInput]>,
>>   HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">;
>> def Xpreprocessor : Separate<["-"], "Xpreprocessor">,
>>
>> Modified: cfe/trunk/test/Driver/cl-options.c
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=188685&r1=188684&r2=188685&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/Driver/cl-options.c (original)
>> +++ cfe/trunk/test/Driver/cl-options.c Mon Aug 19 13:32:59 2013
>> @@ -103,3 +103,9 @@
>> // RUN: %clang_cl /Zs /Gm /Gm- /GS /Gy /Gy- /GZ -- %s 2>&1
>> // RUN: %clang_cl /Zs /RTC1 /wfoo /Zc:wchar_t- -- %s 2>&1
>> // RUN: %clang_cl /Zs /ZI /Zi -- %s 2>&1
>> +
>> +
>> +// We support -Xclang for forwarding options to cc1.
>> +// RUN: %clang_cl -Xclang hellocc1 -### -- %s 2>&1 | FileCheck 
>> -check-prefix=Xclang %s
>> +// Xclang: "-cc1"
>> +// Xclang: "hellocc1"
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to