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

Daniel Dunbar daniel at zuster.org
Fri Apr 29 21:25:16 PDT 2011


Author: ddunbar
Date: Fri Apr 29 23:25:16 2011
New Revision: 130595

URL: http://llvm.org/viewvc/llvm-project?rev=130595&view=rev
Log:
Driver/Darwin: Don't link -lgcc_s.1 when compiling as iOS for the simulator,
that library has never been in the SDK. Fortunately, it shouldn't be necessary,
since that library was also removed in 10.6.

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=130595&r1=130594&r2=130595&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Apr 29 23:25:16 2011
@@ -339,7 +339,10 @@
   // Select the dynamic runtime library and the target specific static library.
   const char *DarwinStaticLib = 0;
   if (isTargetIPhoneOS()) {
-    CmdArgs.push_back("-lgcc_s.1");
+    // If we are compiling as iOS / simulator, don't attempt to link libgcc_s.1,
+    // it never went into the SDK.
+    if (!isTargetIOSSimulator())
+        CmdArgs.push_back("-lgcc_s.1");
 
     // We currently always need a static runtime library for iOS.
     DarwinStaticLib = "libclang_rt.ios.a";





More information about the cfe-commits mailing list