diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-04-01 21:02:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-04-01 21:02:42 +0000 |
commit | 1051fc0ba0fb924d6d4a88a2113460a40a542614 (patch) | |
tree | c641828f418bde423a3a610862c6396242030420 | |
parent | 380ee502b1d91615a753dc490e1e8f83306500b6 (diff) |
Driver/Darwin: Tweak simulator link logic a bit more to be closer to GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128738 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/Tools.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 659b119431..5c986486d6 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2845,7 +2845,10 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, // Derived from startfile spec. if (Args.hasArg(options::OPT_dynamiclib)) { // Derived from darwin_dylib1 spec. - if (getDarwinToolChain().isTargetIPhoneOS()) { + if (getDarwinToolChain().isTargetIOSSimulator()) { + // The simulator doesn't have a versioned crt1 file. + CmdArgs.push_back("-ldylib1.o"); + } else if (getDarwinToolChain().isTargetIPhoneOS()) { if (getDarwinToolChain().isIPhoneOSVersionLT(3, 1)) CmdArgs.push_back("-ldylib1.o"); } else { @@ -2858,7 +2861,10 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_bundle)) { if (!Args.hasArg(options::OPT_static)) { // Derived from darwin_bundle1 spec. - if (getDarwinToolChain().isTargetIPhoneOS()) { + if (getDarwinToolChain().isTargetIOSSimulator()) { + // The simulator doesn't have a versioned crt1 file. + CmdArgs.push_back("-lbundle1.o"); + } else if (getDarwinToolChain().isTargetIPhoneOS()) { if (getDarwinToolChain().isIPhoneOSVersionLT(3, 1)) CmdArgs.push_back("-lbundle1.o"); } else { |