diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-07-04 00:18:41 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-07-04 00:18:41 +0000 |
commit | 4e6e791dc53654dd1e6258829d5c3a1e059b11c3 (patch) | |
tree | 36aeb21c9c26cedc47cdd57b3fd6dd5bab30d19b /lib/Driver/Tools.cpp | |
parent | b0ed95c27318730e265d84227a234e83e5e5523b (diff) |
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
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 01792ae11f..a558c1ff96 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -4341,6 +4341,11 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, // 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"); |