Driver/Darwin: Tweak link logic for simulator.

llvm-svn: 128641
This commit is contained in:
Daniel Dunbar
2011-03-31 17:12:33 +00:00
parent 22c5560bc8
commit ebc34dff18
2 changed files with 14 additions and 1 deletions

View File

@@ -2885,7 +2885,10 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lcrt0.o");
} else {
// Derived from darwin_crt1 spec.
if (getDarwinToolChain().isTargetIPhoneOS()) {
if (getDarwinToolChain().isTargetIOSSimulator()) {
// The simulator doesn't have a versioned crt1 file.
CmdArgs.push_back("-lcrt1.o");
} else if (getDarwinToolChain().isTargetIPhoneOS()) {
if (getDarwinToolChain().isIPhoneOSVersionLT(3, 1))
CmdArgs.push_back("-lcrt1.o");
else