Home | History | Annotate | Download | only in Driver

Lines Matching full:pic

1 // Test the driver's control over the PIC behavior. These consist of tests of
2 // the relocation model flags and the pic level flags passed to CC1.
4 // CHECK-NO-PIC: "-mrelocation-model" "static"
5 // CHECK-NO-PIC-NOT: "-pic-level"
6 // CHECK-NO-PIC-NOT: "-pie-level"
8 // CHECK-PIC1: "-mrelocation-model" "pic"
9 // CHECK-PIC1: "-pic-level" "1"
11 // CHECK-PIC2: "-mrelocation-model" "pic"
12 // CHECK-PIC2: "-pic-level" "2"
14 // CHECK-PIE1: "-mrelocation-model" "pic"
15 // CHECK-PIE1: "-pic-level" "1"
18 // CHECK-PIE2: "-mrelocation-model" "pic"
19 // CHECK-PIE2: "-pic-level" "2"
27 // CHECK-DYNAMIC-NO-PIC-32: "-mrelocation-model" "dynamic-no-pic"
28 // CHECK-DYNAMIC-NO-PIC-32-NOT: "-pic-level"
29 // CHECK-DYNAMIC-NO-PIC-32-NOT: "-pie-level"
31 // CHECK-DYNAMIC-NO-PIC-64: "-mrelocation-model" "dynamic-no-pic"
32 // CHECK-DYNAMIC-NO-PIC-64: "-pic-level" "2"
33 // CHECK-DYNAMIC-NO-PIC-64-NOT: "-pie-level"
35 // CHECK-NON-DARWIN-DYNAMIC-NO-PIC: error: unsupported option '-mdynamic-no-pic' for target 'i386-unknown-unknown'
40 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
50 // Check that PIC and PIE flags obey last-match-wins. If the last flag is
52 // get no PIC.
53 // RUN: %clang -c %s -target i386-unknown-unknown -fpic -fno-pic -### 2>&1 \
54 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
55 // RUN: %clang -c %s -target i386-unknown-unknown -fPIC -fno-pic -### 2>&1 \
56 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
57 // RUN: %clang -c %s -target i386-unknown-unknown -fpie -fno-pic -### 2>&1 \
58 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
59 // RUN: %clang -c %s -target i386-unknown-unknown -fPIE -fno-pic -### 2>&1 \
60 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
61 // RUN: %clang -c %s -target i386-unknown-unknown -fpic -fno-PIC -### 2>&1 \
62 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
63 // RUN: %clang -c %s -target i386-unknown-unknown -fPIC -fno-PIC -### 2>&1 \
64 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
65 // RUN: %clang -c %s -target i386-unknown-unknown -fpie -fno-PIC -### 2>&1 \
66 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
67 // RUN: %clang -c %s -target i386-unknown-unknown -fPIE -fno-PIC -### 2>&1 \
68 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
70 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
72 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
74 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
76 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
78 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
80 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
82 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
84 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
86 // Last-match-wins where both pic and pie are specified.
126 // Disregard any of the PIC-specific flags if we have a trump-card flag.
128 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
130 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
138 // disable PIC, but any other flag enables PIC (*not* PIE) even if the flag
140 // is no PIE, there is only PIC when it comes to compilation.
151 // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -### 2>&1 \
152 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
154 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
155 // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -fpic -### 2>&1 \
157 // RUN: %clang -c %s -target i386-apple-darwin -fno-PIC -fPIE -### 2>&1 \
159 // RUN: %clang -c %s -target x86_64-apple-darwin -fno-PIC -### 2>&1 \
168 // Darwin gets even more special with '-mdynamic-no-pic'. This flag is only
171 // RUN: %clang -c %s -target i386-unknown-unknown -mdynamic-no-pic -### 2>&1 \
172 // RUN: | FileCheck %s --check-prefix=CHECK-NON-DARWIN-DYNAMIC-NO-PIC
173 // RUN: %clang -c %s -target i386-apple-darwin -mdynamic-no-pic -### 2>&1 \
174 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-32
175 // RUN: %clang -c %s -target i386-apple-darwin -mdynamic-no-pic -fno-pic -### 2>&1 \
176 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-32
177 // RUN: %clang -c %s -target i386-apple-darwin -mdynamic-no-pic -fpie -### 2>&1 \
178 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-32
179 // RUN: %clang -c %s -target x86_64-apple-darwin -mdynamic-no-pic -### 2>&1 \
180 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-64
181 // RUN: %clang -c %s -target x86_64-apple-darwin -mdynamic-no-pic -fno-pic -### 2>&1 \
182 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-64
183 // RUN: %clang -c %s -target x86_64-apple-darwin -mdynamic-no-pic -fpie -### 2>&1 \
184 // RUN: | FileCheck %s --check-prefix=CHECK-DYNAMIC-NO-PIC-64
193 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
195 // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC