[cfe-commits] r142372 - /cfe/trunk/lib/Driver/ToolChains.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Tue Oct 18 10:40:15 PDT 2011


Author: akirtzidis
Date: Tue Oct 18 12:40:15 2011
New Revision: 142372

URL: http://llvm.org/viewvc/llvm-project?rev=142372&view=rev
Log:
[driver] Make the driver to link the simulator arclite lib when passing -mios-simulator-version-min.
rdar://10218700

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

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=142372&r1=142371&r2=142372&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Oct 18 12:40:15 2011
@@ -371,9 +371,11 @@
   P.appendComponent("libarclite_");
   std::string s = P.str();
   // Mash in the platform.
-  if (isTargetIPhoneOS())
+  if (isTargetIOSSimulator())
+    s += "iphonesimulator";
+  else if (isTargetIPhoneOS())
     s += "iphoneos";
-  // FIXME: isTargetIphoneOSSimulator() is not returning true.
+  // FIXME: Remove this once we depend fully on -mios-simulator-version-min.
   else if (ARCRuntimeForSimulator != ARCSimulator_None)
     s += "iphonesimulator";
   else
@@ -495,7 +497,7 @@
   // '-miphoneos-version-min' to help us know whether there is an ARC runtime
   // or not; try to parse a __IPHONE_OS_VERSION_MIN_REQUIRED
   // define passed in command-line.
-  if (!iOSVersion) {
+  if (!iOSVersion && !iOSSimVersion) {
     for (arg_iterator it = Args.filtered_begin(options::OPT_D),
            ie = Args.filtered_end(); it != ie; ++it) {
       StringRef define = (*it)->getValue(Args);





More information about the cfe-commits mailing list