diff options
Diffstat (limited to 'test/Driver/pic.c')
-rw-r--r-- | test/Driver/pic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Driver/pic.c b/test/Driver/pic.c index 120e66a92ac4..06b4204e60da 100644 --- a/test/Driver/pic.c +++ b/test/Driver/pic.c @@ -11,6 +11,7 @@ // CHECK-PIC2: "-mrelocation-model" "pic" // CHECK-PIC2: "-pic-level" "2" // +// CHECK-STATIC: "-static" // CHECK-NO-STATIC-NOT: "-static" // // CHECK-PIE1: "-mrelocation-model" "pic" @@ -135,8 +136,15 @@ // Disregard any of the PIC-specific flags if we have a trump-card flag. // RUN: %clang -c %s -target i386-unknown-unknown -mkernel -fPIC -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC + +// The -static argument *doesn't* override PIC: -static only affects +// linking, and -fPIC only affects code generation. // RUN: %clang -c %s -target i386-unknown-unknown -static -fPIC -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC +// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: %clang %s -target i386-linux-gnu -static -fPIC -### \ +// RUN: --gcc-toolchain="" \ +// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-STATIC // // On Linux, disregard -pie if we have -shared. // RUN: %clang %s -target i386-unknown-linux -shared -pie -### 2>&1 \ @@ -204,6 +212,8 @@ // RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -x assembler -c %s -target arm64-apple-ios -mkernel -miphoneos-version-min=7.0.0 -no-integrated-as -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-STATIC +// RUN: %clang -c %s -target armv7k-apple-watchos -fapple-kext -mwatchos-version-min=1.0.0 -### 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \ |