diff options
Diffstat (limited to 'test/Driver/pic.c')
-rw-r--r-- | test/Driver/pic.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/Driver/pic.c b/test/Driver/pic.c index aeb2ee33114c9..9f9d09c54cf08 100644 --- a/test/Driver/pic.c +++ b/test/Driver/pic.c @@ -3,24 +3,26 @@ // // CHECK-NO-PIC: "-mrelocation-model" "static" // CHECK-NO-PIC-NOT: "-pic-level" -// CHECK-NO-PIC-NOT: "-pie-level" +// CHECK-NO-PIC-NOT: "-pic-is-pie" // // CHECK-PIC1: "-mrelocation-model" "pic" // CHECK-PIC1: "-pic-level" "1" +// CHECK-PIC1-NOT: "-pic-is-pie" // // CHECK-PIC2: "-mrelocation-model" "pic" // CHECK-PIC2: "-pic-level" "2" +// CHECK-PIC2-NOT: "-pic-is-pie" // // CHECK-STATIC: "-static" // CHECK-NO-STATIC-NOT: "-static" // // CHECK-PIE1: "-mrelocation-model" "pic" // CHECK-PIE1: "-pic-level" "1" -// CHECK-PIE1: "-pie-level" "1" +// CHECK-PIE1: "-pic-is-pie" // // CHECK-PIE2: "-mrelocation-model" "pic" // CHECK-PIE2: "-pic-level" "2" -// CHECK-PIE2: "-pie-level" "2" +// CHECK-PIE2: "-pic-is-pie" // // CHECK-PIE-LD: "{{.*}}ld{{(.exe)?}}" // CHECK-PIE-LD: "-pie" @@ -31,11 +33,11 @@ // // CHECK-DYNAMIC-NO-PIC-32: "-mrelocation-model" "dynamic-no-pic" // CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-level" -// CHECK-DYNAMIC-NO-PIC-32-NOT: "-pie-level" +// CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-is-pie" // // CHECK-DYNAMIC-NO-PIC-64: "-mrelocation-model" "dynamic-no-pic" // CHECK-DYNAMIC-NO-PIC-64: "-pic-level" "2" -// CHECK-DYNAMIC-NO-PIC-64-NOT: "-pie-level" +// CHECK-DYNAMIC-NO-PIC-64-NOT: "-pic-is-pie" // // CHECK-NON-DARWIN-DYNAMIC-NO-PIC: error: unsupported option '-mdynamic-no-pic' for target 'i386-unknown-unknown' // @@ -151,10 +153,9 @@ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIE // // Darwin is a beautiful and unique snowflake when it comes to these flags. -// When targeting 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 -// specifies PIE. On 64-bit targets, there is simply nothing you can do, there -// is no PIE, there is only PIC when it comes to compilation. +// When targeting a 32-bit darwin system, only level 2 is supported. On 64-bit +// targets, there is simply nothing you can do, there is no PIE, there is only +// PIC when it comes to compilation. // RUN: %clang -c %s -target i386-apple-darwin -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -c %s -target i386-apple-darwin -fpic -### 2>&1 \ @@ -162,9 +163,9 @@ // RUN: %clang -c %s -target i386-apple-darwin -fPIC -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -c %s -target i386-apple-darwin -fpie -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 // RUN: %clang -c %s -target i386-apple-darwin -fPIE -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // RUN: %clang -c %s -target i386-apple-darwin -fno-PIE -### 2>&1 \ @@ -172,7 +173,7 @@ // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -fpic -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -fPIE -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: | FileCheck %s --check-prefix=CHECK-PIE2 // RUN: %clang -c %s -target x86_64-apple-darwin -fno-PIC -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -c %s -target x86_64-apple-darwin -fno-PIE -### 2>&1 \ |