Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Nov 2012 12:05:55 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r242553 - stable/9/contrib/llvm/tools/clang/lib/Driver
Message-ID:  <201211041205.qA4C5tGE080769@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Nov  4 12:05:54 2012
New Revision: 242553
URL: http://svn.freebsd.org/changeset/base/242553

Log:
  MFC r238864:
  
  Similar to what is already done for Linux, make clang not complain about
  unused -g, -emit-llvm or -w arguments when doing linking.  E.g. invoking
  "clang -g foo.o -o foo" will now be silent.
  
  Reported by:	Jakub Lach <jakub_lach@mailplus.pl>

Modified:
  stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)

Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Sun Nov  4 11:46:17 2012	(r242552)
+++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Sun Nov  4 12:05:54 2012	(r242553)
@@ -4745,6 +4745,14 @@ void freebsd::Link::ConstructJob(Compila
   const Driver &D = getToolChain().getDriver();
   ArgStringList CmdArgs;
 
+  // Silence warning for "clang -g foo.o -o foo"
+  Args.ClaimAllArgs(options::OPT_g_Group);
+  // and "clang -emit-llvm foo.o -o foo"
+  Args.ClaimAllArgs(options::OPT_emit_llvm);
+  // and for "clang -w foo.o -o foo". Other warning options are already
+  // handled somewhere else.
+  Args.ClaimAllArgs(options::OPT_w);
+
   if (!D.SysRoot.empty())
     CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211041205.qA4C5tGE080769>