Move a comment from the commit message into the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159696 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 01792ae..a558c1f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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");