aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-03-31 17:12:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-03-31 17:12:33 +0000
commit4035580e3475db9013f335ce2b8a49dd1988a79a (patch)
treea8b48dc5d26ab98b05abaefe69b0c0d387e3c192 /lib/Driver/Tools.cpp
parent361701965ed119099d180d419ac25a0503fcc0fe (diff)
Driver/Darwin: Tweak link logic for simulator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 8ac68ed952..659b119431 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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