Darwin ld: Unconditionally add -lstdc++ if we are pretending to be

g++.

llvm-svn: 68601
This commit is contained in:
Daniel Dunbar 2009-04-08 06:06:21 +00:00
parent 937b68b201
commit ad0f62b203
1 changed files with 5 additions and 0 deletions

View File

@ -1481,6 +1481,11 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nodefaultlibs)) {
// FIXME: g++ is more complicated here, it tries to put -lstdc++
// before -lm, for example.
if (getToolChain().getHost().getDriver().CCCIsCXX)
CmdArgs.push_back("-lstdc++");
// link_ssp spec is empty.
// Derived from libgcc and lib specs but refactored.