[cfe-commits] r128738 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Fri Apr 1 14:02:42 PDT 2011


Author: ddunbar
Date: Fri Apr  1 16:02:42 2011
New Revision: 128738

URL: http://llvm.org/viewvc/llvm-project?rev=128738&view=rev
Log:
Driver/Darwin: Tweak simulator link logic a bit more to be closer to GCC.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=128738&r1=128737&r2=128738&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr  1 16:02:42 2011
@@ -2845,7 +2845,10 @@
     // 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 @@
       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 {





More information about the cfe-commits mailing list