[cfe-commits] r159683 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/darwin-ld.c

Eric Christopher echristo at apple.com
Tue Jul 3 17:09:03 PDT 2012


On Jul 3, 2012, at 1:42 PM, Bob Wilson <bob.wilson at apple.com> wrote:

> By default on OS X 10.8, 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, and the linker needs to be told to use
> the "start" symbol as the entry point.  The -no_new_main linker option does
> that last part. 

This would be a great comment...

> 
>             // darwin_crt2 spec is empty.
>           }
> +          if (getDarwinToolChain().isTargetMacOS() &&
> +              !getDarwinToolChain().isMacosxVersionLT(10, 8))
> +            CmdArgs.push_back("-no_new_main");
>         } else {

here. :)

-eric



More information about the cfe-commits mailing list