[cfe-commits] r154392 - /cfe/trunk/lib/Driver/Tools.cpp
David Chisnall
csdavec at swan.ac.uk
Tue Apr 10 04:49:50 PDT 2012
Author: theraven
Date: Tue Apr 10 06:49:50 2012
New Revision: 154392
URL: http://llvm.org/viewvc/llvm-project?rev=154392&view=rev
Log:
Don't link lib[std]c++ when -nostdlib is specified (Solaris driver).
Patch by Dmitri Shubin!
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=154392&r1=154391&r2=154392&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 10 06:49:50 2012
@@ -4429,11 +4429,11 @@
Args.AddAllArgs(CmdArgs, options::OPT_r);
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
- if (getToolChain().getDriver().CCCIsCXX)
- getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nodefaultlibs)) {
+ if (getToolChain().getDriver().CCCIsCXX)
+ getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
CmdArgs.push_back("-lgcc_s");
if (!Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back("-lgcc");
More information about the cfe-commits
mailing list