| 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-CYGWIN |
| 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-CYGWIN |
| 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-CYGWIN |
| 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 |
// RUN: %clang -### -target powerpc-ibm-aix-xcoff -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-AIX |
| 21 |
// RUN: %clang -### -target powerpc64-ibm-aix-xcoff -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-AIX |
| 22 |
|
| 23 |
// CHECK-WINDOWS: "-fno-use-cxa-atexit" |
| 24 |
// CHECK-CYGWIN-NOT: "-fno-use-cxa-atexit" |
| 25 |
// CHECK-SOLARIS-NOT: "-fno-use-cxa-atexit" |
| 26 |
// CHECK-HEXAGON-NOT: "-fno-use-cxa-atexit" |
| 27 |
// CHECK-XCORE: "-fno-use-cxa-atexit" |
| 28 |
// CHECK-MTI: "-fno-use-cxa-atexit" |
| 29 |
// CHECK-MIPS-NOT: "-fno-use-cxa-atexit" |
| 30 |
// CHECK-AIX: "-fno-use-cxa-atexit" |
| 31 |
|
| 32 |
// RUN: %clang -target x86_64-apple-darwin -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 33 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 34 |
// RUN: %clang -target x86_64-apple-darwin -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 35 |
// RUN: FileCheck --check-prefix=WITHATEXIT %s |
| 36 |
// RUN: %clang -target x86_64-apple-darwin -c -### %s 2>&1 | \ |
| 37 |
// RUN: FileCheck --check-prefix=WITHATEXIT %s |
| 38 |
// RUN: %clang -target x86_64-apple-darwin -c -mkernel -### %s 2>&1 | \ |
| 39 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 40 |
|
| 41 |
// RUN: %clang -target x86_64-pc-linux-gnu -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 42 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 43 |
// RUN: %clang -target x86_64-pc-linux-gnu -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 44 |
// RUN: FileCheck --check-prefix=WITHATEXIT %s |
| 45 |
// RUN: %clang -target x86_64-pc-linux-gnu -c -### %s 2>&1 | \ |
| 46 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 47 |
|
| 48 |
// RUN: %clang -target powerpc-ibm-aix-xcoff -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 49 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 50 |
// RUN: %clang -target powerpc-ibm-aix-xcoff -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 51 |
// RUN: FileCheck --check-prefix=WITHATEXIT %s |
| 52 |
// RUN: %clang -target powerpc-ibm-aix-xcoff -c -### %s 2>&1 | \ |
| 53 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 54 |
// RUN: %clang -target powerpc64-ibm-aix-xcoff -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 55 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 56 |
// RUN: %clang -target powerpc64-ibm-aix-xcoff -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ |
| 57 |
// RUN: FileCheck --check-prefix=WITHATEXIT %s |
| 58 |
// RUN: %clang -target powerpc64-ibm-aix-xcoff -c -### %s 2>&1 | \ |
| 59 |
// RUN: FileCheck --check-prefix=WITHOUTATEXIT %s |
| 60 |
|
| 61 |
// WITHATEXIT: -fregister-global-dtors-with-atexit |
| 62 |
// WITHOUTATEXIT-NOT: -fregister-global-dtors-with-atexit |