Driver/Darwin: Don't link -lgcc_s.1 when compiling as iOS for the simulator,

that library has never been in the SDK. Fortunately, it shouldn't be necessary,
since that library was also removed in 10.6.

llvm-svn: 130595
This commit is contained in:
Daniel Dunbar 2011-04-30 04:25:16 +00:00
parent 72ceb92aa3
commit 2f31fb99ef
1 changed files with 4 additions and 1 deletions

View File

@ -339,7 +339,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
// Select the dynamic runtime library and the target specific static library.
const char *DarwinStaticLib = 0;
if (isTargetIPhoneOS()) {
CmdArgs.push_back("-lgcc_s.1");
// If we are compiling as iOS / simulator, don't attempt to link libgcc_s.1,
// it never went into the SDK.
if (!isTargetIOSSimulator())
CmdArgs.push_back("-lgcc_s.1");
// We currently always need a static runtime library for iOS.
DarwinStaticLib = "libclang_rt.ios.a";