diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2012-07-03 20:42:10 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2012-07-03 20:42:10 +0000 |
| commit | 1e148fe064bbb65ae1fcdc893db0e7af781ad20b (patch) | |
| tree | 5c5f90b7f30453484a770018818972f88599355d /clang/test/Driver | |
| parent | fa6d73cc900334ae55bdd518315655613ebad4ad (diff) | |
| download | bcm5719-llvm-1e148fe064bbb65ae1fcdc893db0e7af781ad20b.tar.gz bcm5719-llvm-1e148fe064bbb65ae1fcdc893db0e7af781ad20b.zip | |
When using -pg targeting OS X 10.8, pass -no_new_main to the linker.
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. <rdar://problem/11491405>
llvm-svn: 159683
Diffstat (limited to 'clang/test/Driver')
| -rw-r--r-- | clang/test/Driver/darwin-ld.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c index 3206f654d5c..4cda37f9b2e 100644 --- a/clang/test/Driver/darwin-ld.c +++ b/clang/test/Driver/darwin-ld.c @@ -121,3 +121,8 @@ // RUN: %clang -target x86_64-apple-darwin12 -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_NO_CRT1 %s < %t.log // LINK_NO_CRT1-NOT: crt + +// RUN: %clang -target i386-apple-darwin12 -pg -### %t.o 2> %t.log +// RUN: FileCheck -check-prefix=LINK_PG %s < %t.log +// LINK_PG: -lgcrt1.o +// LINK_PG: -no_new_main |

