1 | // RUN: %clang -### -target armv7-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
2 | // RUN: %clang -### -target armv7-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
3 | // RUN: %clang -### -target armv7-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
4 | // RUN: %clang -### -target armv7-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
5 | // RUN: %clang -### -target i686-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
6 | // RUN: %clang -### -target i686-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
7 | // RUN: %clang -### -target i686-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
8 | // RUN: %clang -### -target i686-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
9 | // RUN: %clang -### -target x86_64-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
10 | // RUN: %clang -### -target x86_64-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
11 | // RUN: %clang -### -target x86_64-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
12 | // RUN: %clang -### -target x86_64-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS |
13 | // RUN: %clang -### -target hexagon-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-HEXAGON |
14 | // RUN: %clang -### -target xcore-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-XCORE |
15 | // RUN: %clang -### -target armv7-mti-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MTI |
16 | // RUN: %clang -### -target mips-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS |
17 | // RUN: %clang -### -target mips-unknown-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS |
18 | // RUN: %clang -### -target mips-mti-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS |
19 | // RUN: %clang -### -target sparc-sun-solaris -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-SOLARIS |
20 | |
21 | // CHECK-WINDOWS: "-fno-use-cxa-atexit" |
22 | // CHECK-SOLARIS: "-fno-use-cxa-atexit" |
23 | // CHECK-HEXAGON-NOT: "-fno-use-cxa-atexit" |
24 | // CHECK-XCORE: "-fno-use-cxa-atexit" |
25 | // CHECK-MTI: "-fno-use-cxa-atexit" |
26 | // CHECK-MIPS-NOT: "-fno-use-cxa-atexit" |
27 | |
28 | // RUN: %clang -target x86_64-apple-darwin -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
29 | // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
30 | // RUN: %clang -target x86_64-apple-darwin -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
31 | // RUN: FileCheck --check-prefix=WITHATEXIT %s |
32 | // RUN: %clang -target x86_64-apple-darwin -c -### %s 2>&1 | \ |
33 | // RUN: FileCheck --check-prefix=WITHATEXIT %s |
34 | // RUN: %clang -target x86_64-apple-darwin -c -mkernel -### %s 2>&1 | \ |
35 | // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
36 | // RUN: %clang -target x86_64-pc-linux-gnu -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
37 | // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
38 | // RUN: %clang -target x86_64-pc-linux-gnu -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
39 | // RUN: FileCheck --check-prefix=WITHATEXIT %s |
40 | // RUN: %clang -target x86_64-pc-linux-gnu -c -### %s 2>&1 | \ |
41 | // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
42 | |
43 | // WITHATEXIT: -fregister-global-dtors-with-atexit |
44 | // WITHOUTATEXIT-NOT: -fregister-global-dtors-with-atexit |
45 | |