[cfe-commits] r153854 - /cfe/trunk/lib/Driver/Tools.cpp
bob.wilson at apple.com
Tue Apr 3 23:13:43 PDT 2012
On Apr 1, 2012, at 4:47 PM, David Blaikie wrote:
> On Sun, Apr 1, 2012 at 4:03 PM, Bob Wilson <bob.wilson at apple.com> wrote:
>> Author: bwilson
>> Date: Sun Apr 1 18:03:29 2012
>> New Revision: 153854
>> URL: http://llvm.org/viewvc/llvm-project?rev=153854&view=rev
>> Ignore unused --serialize-diagnostics option when using llvm-gcc.
>> llvm-gcc doesn't handle --serialize-diagnostics so when compiling i386
>> kernel/kext code with -Werror, you get an error about that option being
>> unused. Claim the argument to prevent this from breaking builds.
>> Modified: cfe/trunk/lib/Driver/Tools.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=153854&r1=153853&r2=153854&view=diff
>> --- cfe/trunk/lib/Driver/Tools.cpp (original)
>> +++ cfe/trunk/lib/Driver/Tools.cpp Sun Apr 1 18:03:29 2012
>> @@ -3619,6 +3619,9 @@
>> assert(Inputs.size() == 1 && "Unexpected number of inputs!");
>> + // Silence warning about unused --serialize-diagnostics
>> + Args.ClaimAllArgs(options::OPT__serialize_diags);
> Should this be in the big table at Tools.cpp:3208?
I'm hardly an expert on the driver, but no, I don't think so. That big table is a list of cc1 options that are not supported by llvm-gcc and need to be filtered out of the cc1 command line. This is for a driver option that is never passed to cc1 regardless. It doesn't need to be filtered out -- it just needs to be claimed to avoid unwanted warnings.
More information about the cfe-commits