From b79fdff9e26511bf298163067a9feaf71b48d5b4 Mon Sep 17 00:00:00 2001 From: Sumanth Gundapaneni Date: Wed, 2 Dec 2015 19:12:41 +0000 Subject: Fix the clang driver when "-nostdlib" is present 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. Differential Revision: http://reviews.llvm.org/D15130 llvm-svn: 254535 --- clang/lib/Driver/Tools.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 484737b2bcc..2015e3b821d 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -8694,8 +8694,7 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, 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(JA, *this, Exec, CmdArgs, Inputs)); } -- cgit v1.2.3