From 26f14c309e8de2db8c144342808cca2e869c1777 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 15 Nov 2010 18:28:16 +0000 Subject: [PATCH] Fixes PR8611. Silence warning about -g not being used during linking. I couldn't find any change in behavior in gcc liking when given -g. Please open another bug if I missed something. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119166 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 223576e71d..31def8f9e0 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3207,6 +3207,9 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA, const Driver &D = ToolChain.getDriver(); ArgStringList CmdArgs; + // Silence warning for "clang -g foo.o -o foo" + Args.ClaimAllArgs(options::OPT_g_Group); + if (Arg *A = Args.getLastArg(options::OPT__sysroot_EQ)) { CmdArgs.push_back("--sysroot"); CmdArgs.push_back(A->getValue(Args)); -- 2.40.0