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