[PATCH] D15130: Fix the clang driver when "-nostdlib" is present

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 1 15:34:06 PST 2015


Testcase?

> On 2015-Dec-01, at 14:58, Sumanth Gundapaneni via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> sgundapa created this revision.
> sgundapa added reviewers: vkalintiris, echristo.
> sgundapa added a subscriber: cfe-commits.
> 
> This patch is a fix to r252901 which changed the behavior of 
> clang driver. In the presence of "-nostdlib" none of the standard
> libraries should be passed to link line. 
> 
> http://reviews.llvm.org/D15130
> 
> Files:
>  lib/Driver/Tools.cpp
> 
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -8694,8 +8694,7 @@
>       if (!isAndroid)
>         CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtn.o")));
>     }
> -  } else if (Args.hasArg(options::OPT_rtlib_EQ))
> -    AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
> +  }
> 
>   C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
> }
> 
> 
> <D15130.41566.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list