aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/pic.c')
-rw-r--r--test/Driver/pic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Driver/pic.c b/test/Driver/pic.c
index 54e5982c085f..8ba931954b1d 100644
--- a/test/Driver/pic.c
+++ b/test/Driver/pic.c
@@ -34,6 +34,8 @@
//
// CHECK-NON-DARWIN-DYNAMIC-NO-PIC: error: unsupported option '-mdynamic-no-pic' for target 'i386-unknown-unknown'
//
+// CHECK-NO-PIE-NOT: "-pie"
+//
// RUN: %clang -c %s -target i386-unknown-unknown -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
// RUN: %clang -c %s -target i386-unknown-unknown -fpic -### 2>&1 \
@@ -127,6 +129,10 @@
// RUN: %clang -c %s -target i386-unknown-unknown -static -fPIC -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
//
+// On Linux, disregard -pie if we have -shared.
+// RUN: %clang %s -target i386-unknown-linux -shared -pie -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIE
+//
// Darwin is a beautiful and unique snowflake when it comes to these flags.
// When targetting a 32-bit darwin system, the -fno-* flag variants work and
// disable PIC, but any other flag enables PIC (*not* PIE) even if the flag