mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 17:01:00 +08:00
Darwin ld: Unconditionally add -lstdc++ if we are pretending to be
g++. llvm-svn: 68601
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user