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

Bob Wilson bob.wilson at apple.com
Tue Jul 3 17:18:41 PDT 2012


Author: bwilson
Date: Tue Jul  3 19:18:41 2012
New Revision: 159696

URL: http://llvm.org/viewvc/llvm-project?rev=159696&view=rev
Log:
Move a comment from the commit message into the code.

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=159696&r1=159695&r2=159696&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jul  3 19:18:41 2012
@@ -4341,6 +4341,11 @@
 
             // darwin_crt2 spec is empty.
           }
+          // By default on OS X 10.8 and later, we don't link with a crt1.o
+          // file and the linker knows to use _main as the entry point.  But,
+          // when compiling with -pg, we need to link with the gcrt1.o file,
+          // so pass the -no_new_main option to tell the linker to use the
+          // "start" symbol as the entry point.
           if (getDarwinToolChain().isTargetMacOS() &&
               !getDarwinToolChain().isMacosxVersionLT(10, 8))
             CmdArgs.push_back("-no_new_main");





More information about the cfe-commits mailing list