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 | ef285b4c22b78e0c5452047768f6145f82507f02 (patch) | |
tree | 8bc709e9213b30bc8dfbe368724a3db549be5857 /clang/lib/Driver/Tools.cpp | |
parent | 49e4d4b3ef810a6e6d1df67dc26dab5faae8e025 (diff) | |
download | bcm5719-llvm-ef285b4c22b78e0c5452047768f6145f82507f02.tar.gz bcm5719-llvm-ef285b4c22b78e0c5452047768f6145f82507f02.zip |
Move a comment from the commit message into the code.
llvm-svn: 159696
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 01792ae11fa..a558c1ff960 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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"); |