summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/darwin-ld.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-13 23:31:40 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-13 23:31:40 +0000
commitaf68a88e6862d26ebf4046a33308d531f85cd197 (patch)
treef5d70fd5db9b74f218263383e7a9d80967682407 /clang/test/Driver/darwin-ld.c
parentc95a41b510824a8f24f9ba359ba78ff203dfabc0 (diff)
downloadbcm5719-llvm-af68a88e6862d26ebf4046a33308d531f85cd197.tar.gz
bcm5719-llvm-af68a88e6862d26ebf4046a33308d531f85cd197.zip
Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
are explicitly given. llvm-svn: 108297
Diffstat (limited to 'clang/test/Driver/darwin-ld.c')
-rw-r--r--clang/test/Driver/darwin-ld.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c
index 0a898956760..448446885a1 100644
--- a/clang/test/Driver/darwin-ld.c
+++ b/clang/test/Driver/darwin-ld.c
@@ -70,3 +70,15 @@
// LINK_IPHONE_3_1: ld"
// LINK_IPHONE_3_1-NOT: -lbundle1.o
// LINK_IPHONE_3_1: -lSystem
+
+// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -fpie %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_EXPLICIT_PIE %s < %t.log
+//
+// LINK_EXPLICIT_PIE: ld"
+// LINK_EXPLICIT_PIE: "-pie"
+
+// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -fno-pie %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_EXPLICIT_NO_PIE %s < %t.log
+//
+// LINK_EXPLICIT_NO_PIE: ld"
+// LINK_EXPLICIT_NO_PIE: "-no_pie"
OpenPOWER on IntegriCloud