Clang Project

clang_source_code/test/Driver/windows-pic.cpp
1// RUN: %clang -### -target i686-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
2// RUN: %clang -### -target i686-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
3// RUN: %clang -### -target i686-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
4// RUN: %clang -### -target i686-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
5// RUN: %clang -### -target i686-windows -fPIC -fno-pic %s
6// RUN: %clang -### -target i686-windows -Fpic -fno-pic %s
7// RUN: %clang -### -target i686-windows -fPIE -fno-pie %s
8// RUN: %clang -### -target i686-windows -fpie -fno-pie %s
9
10// RUN: %clang -### -target i686-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
11// RUN: %clang -### -target i686-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
12// RUN: %clang -### -target i686-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
13// RUN: %clang -### -target i686-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
14// RUN: %clang -### -target i686-windows-itanium -fPIC -fno-pic %s
15// RUN: %clang -### -target i686-windows-itanium -Fpic -fno-pic %s
16// RUN: %clang -### -target i686-windows-itanium -fPIE -fno-pie %s
17// RUN: %clang -### -target i686-windows-itanium -fpie -fno-pie %s
18
19// RUN: %clang -### -target i686-windows-gnu -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
20// RUN: %clang -### -target i686-windows-gnu -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
21// RUN: %clang -### -target i686-windows-gnu -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
22// RUN: %clang -### -target i686-windows-gnu -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
23// RUN: %clang -### -target i686-windows-gnu -fPIC -fno-pic %s
24// RUN: %clang -### -target i686-windows-gnu -Fpic -fno-pic %s
25// RUN: %clang -### -target i686-windows-gnu -fPIE -fno-pie %s
26// RUN: %clang -### -target i686-windows-gnu -fpie -fno-pie %s
27
28// RUN: %clang -### -target x86_64-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
29// RUN: %clang -### -target x86_64-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
30// RUN: %clang -### -target x86_64-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
31// RUN: %clang -### -target x86_64-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
32// RUN: %clang -### -target x86_64-windows -fPIC -fno-pic %s
33// RUN: %clang -### -target x86_64-windows -Fpic -fno-pic %s
34// RUN: %clang -### -target x86_64-windows -fPIE -fno-pie %s
35// RUN: %clang -### -target x86_64-windows -fpie -fno-pie %s
36
37// RUN: %clang -### -target x86_64-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
38// RUN: %clang -### -target x86_64-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
39// RUN: %clang -### -target x86_64-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
40// RUN: %clang -### -target x86_64-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
41// RUN: %clang -### -target x86_64-windows-itanium -fPIC -fno-pic %s
42// RUN: %clang -### -target x86_64-windows-itanium -Fpic -fno-pic %s
43// RUN: %clang -### -target x86_64-windows-itanium -fPIE -fno-pie %s
44// RUN: %clang -### -target x86_64-windows-itanium -fpie -fno-pie %s
45
46// RUN: %clang -### -target x86_64-windows-gnu -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s
47// RUN: %clang -### -target x86_64-windows-gnu -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s
48// RUN: %clang -### -target x86_64-windows-gnu -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s
49// RUN: %clang -### -target x86_64-windows-gnu -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s
50// RUN: %clang -### -target x86_64-windows-gnu -fPIC -fno-pic %s
51// RUN: %clang -### -target x86_64-windows-gnu -Fpic -fno-pic %s
52// RUN: %clang -### -target x86_64-windows-gnu -fPIE -fno-pie %s
53// RUN: %clang -### -target x86_64-windows-gnu -fpie -fno-pie %s
54
55// CHECK-PIC-ERROR: unsupported option '-fPIC' for target '{{.*}}
56// CHECK-pic-ERROR: unsupported option '-fpic' for target '{{.*}}
57// CHECK-PIE-ERROR: unsupported option '-fPIE' for target '{{.*}}
58// CHECK-pie-ERROR: unsupported option '-fpie' for target '{{.*}}
59
60