svn commit: r238864 - head/contrib/llvm/tools/clang/lib/Driver
Dimitry Andric
dim at FreeBSD.org
Sat Jul 28 13:12:58 UTC 2012
Author: dim
Date: Sat Jul 28 13:12:57 2012
New Revision: 238864
URL: http://svn.freebsd.org/changeset/base/238864
Log:
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 at mailplus.pl>
MFC after: 1 week
Modified:
head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat Jul 28 12:50:25 2012 (r238863)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat Jul 28 13:12:57 2012 (r238864)
@@ -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));
More information about the svn-src-head
mailing list