]> granicus.if.org Git - clang/commitdiff
Ignore unused --serialize-diagnostics option when using llvm-gcc.
authorBob Wilson <bob.wilson@apple.com>
Sun, 1 Apr 2012 23:03:29 +0000 (23:03 +0000)
committerBob Wilson <bob.wilson@apple.com>
Sun, 1 Apr 2012 23:03:29 +0000 (23:03 +0000)
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.
<rdar://problem/11161933>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153854 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index f3faeecb474f6ee371508a4ea0517191983e0747..aaa73c1436a71c565fcfba78fc7ad12da59786c1 100644 (file)
@@ -3619,6 +3619,9 @@ void darwin::Compile::ConstructJob(Compilation &C, const JobAction &JA,
 
   assert(Inputs.size() == 1 && "Unexpected number of inputs!");
 
+  // Silence warning about unused --serialize-diagnostics
+  Args.ClaimAllArgs(options::OPT__serialize_diags);
+
   types::ID InputType = Inputs[0].getType();
   const Arg *A;
   if ((A = Args.getLastArg(options::OPT_traditional)))