1015bded2SSaleem Abdulrasool // RUN: %clang -### -target armv7-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 2015bded2SSaleem Abdulrasool // RUN: %clang -### -target armv7-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 3015bded2SSaleem Abdulrasool // RUN: %clang -### -target armv7-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 4015bded2SSaleem Abdulrasool // RUN: %clang -### -target armv7-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 5015bded2SSaleem Abdulrasool // RUN: %clang -### -target i686-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 6015bded2SSaleem Abdulrasool // RUN: %clang -### -target i686-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 7015bded2SSaleem Abdulrasool // RUN: %clang -### -target i686-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 8015bded2SSaleem Abdulrasool // RUN: %clang -### -target i686-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 9015bded2SSaleem Abdulrasool // RUN: %clang -### -target x86_64-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 10015bded2SSaleem Abdulrasool // RUN: %clang -### -target x86_64-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 11015bded2SSaleem Abdulrasool // RUN: %clang -### -target x86_64-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 12015bded2SSaleem Abdulrasool // RUN: %clang -### -target x86_64-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS 13015bded2SSaleem Abdulrasool // RUN: %clang -### -target hexagon-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-HEXAGON 14015bded2SSaleem Abdulrasool // RUN: %clang -### -target xcore-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-XCORE 15015bded2SSaleem Abdulrasool // RUN: %clang -### -target armv7-mti-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MTI 16015bded2SSaleem Abdulrasool // RUN: %clang -### -target mips-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS 17015bded2SSaleem Abdulrasool // RUN: %clang -### -target mips-unknown-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS 18015bded2SSaleem Abdulrasool // RUN: %clang -### -target mips-mti-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS 19015bded2SSaleem Abdulrasool // RUN: %clang -### -target sparc-sun-solaris -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-SOLARIS 203f2e61c1SXiangling Liao // RUN: %clang -### -target powerpc-ibm-aix-xcoff -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-AIX 213f2e61c1SXiangling Liao // RUN: %clang -### -target powerpc64-ibm-aix-xcoff -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-AIX 22015bded2SSaleem Abdulrasool 23015bded2SSaleem Abdulrasool // CHECK-WINDOWS: "-fno-use-cxa-atexit" 2496627215SRainer Orth // CHECK-SOLARIS-NOT: "-fno-use-cxa-atexit" 25d6a76f76SBrian Cain // CHECK-HEXAGON-NOT: "-fno-use-cxa-atexit" 26015bded2SSaleem Abdulrasool // CHECK-XCORE: "-fno-use-cxa-atexit" 27015bded2SSaleem Abdulrasool // CHECK-MTI: "-fno-use-cxa-atexit" 28015bded2SSaleem Abdulrasool // CHECK-MIPS-NOT: "-fno-use-cxa-atexit" 293f2e61c1SXiangling Liao // CHECK-AIX: "-fno-use-cxa-atexit" 30015bded2SSaleem Abdulrasool 31617e2615SAkira Hatanaka // RUN: %clang -target x86_64-apple-darwin -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ 32617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 33617e2615SAkira Hatanaka // RUN: %clang -target x86_64-apple-darwin -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ 34617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHATEXIT %s 35617e2615SAkira Hatanaka // RUN: %clang -target x86_64-apple-darwin -c -### %s 2>&1 | \ 36617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHATEXIT %s 3718db58e7SAkira Hatanaka // RUN: %clang -target x86_64-apple-darwin -c -mkernel -### %s 2>&1 | \ 3818db58e7SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 39*ec6ada62SXiangling Liao 40617e2615SAkira Hatanaka // RUN: %clang -target x86_64-pc-linux-gnu -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ 41617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 42617e2615SAkira Hatanaka // RUN: %clang -target x86_64-pc-linux-gnu -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ 43617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHATEXIT %s 44617e2615SAkira Hatanaka // RUN: %clang -target x86_64-pc-linux-gnu -c -### %s 2>&1 | \ 45617e2615SAkira Hatanaka // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 46617e2615SAkira Hatanaka 47*ec6ada62SXiangling Liao // RUN: %clang -target powerpc-ibm-aix-xcoff -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ 48*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 49*ec6ada62SXiangling Liao // RUN: %clang -target powerpc-ibm-aix-xcoff -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ 50*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHATEXIT %s 51*ec6ada62SXiangling Liao // RUN: %clang -target powerpc-ibm-aix-xcoff -c -### %s 2>&1 | \ 52*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 53*ec6ada62SXiangling Liao // RUN: %clang -target powerpc64-ibm-aix-xcoff -fregister-global-dtors-with-atexit -fno-register-global-dtors-with-atexit -c -### %s 2>&1 | \ 54*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 55*ec6ada62SXiangling Liao // RUN: %clang -target powerpc64-ibm-aix-xcoff -fno-register-global-dtors-with-atexit -fregister-global-dtors-with-atexit -c -### %s 2>&1 | \ 56*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHATEXIT %s 57*ec6ada62SXiangling Liao // RUN: %clang -target powerpc64-ibm-aix-xcoff -c -### %s 2>&1 | \ 58*ec6ada62SXiangling Liao // RUN: FileCheck --check-prefix=WITHOUTATEXIT %s 59*ec6ada62SXiangling Liao 60617e2615SAkira Hatanaka // WITHATEXIT: -fregister-global-dtors-with-atexit 61617e2615SAkira Hatanaka // WITHOUTATEXIT-NOT: -fregister-global-dtors-with-atexit 62