From owner-svn-src-all@FreeBSD.ORG Sun Nov 4 12:05:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 583EE70E; Sun, 4 Nov 2012 12:05:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4E38FC15; Sun, 4 Nov 2012 12:05:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA4C5tEQ080771; Sun, 4 Nov 2012 12:05:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA4C5tGE080769; Sun, 4 Nov 2012 12:05:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211041205.qA4C5tGE080769@svn.freebsd.org> From: Dimitry Andric Date: Sun, 4 Nov 2012 12:05:55 +0000 (UTC) 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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Nov 2012 12:05:55 -0000 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 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));