diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-09-11 20:18:09 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-09-11 20:18:09 +0000 |
commit | 015bded23ff905426b56699625f3d43cd3dfda27 (patch) | |
tree | 523bba6b43430855099904e3d62c282992c8c37f /clang/test/Driver/cxa-atexit.cpp | |
parent | 5941b0bb632afee25ae9eb6ed6b998871459f9df (diff) | |
download | bcm5719-llvm-015bded23ff905426b56699625f3d43cd3dfda27.tar.gz bcm5719-llvm-015bded23ff905426b56699625f3d43cd3dfda27.zip |
Driver: default to `-fno-use-cxatexit` on Windows
This primarily impacts the Windows MSVC and Windows itanium
environments. Windows MSVC does not use `__cxa_atexit` and Itanium
follows suit. Simplify the logic for the default value calculation and
blanket the Windows environments to default to off for use of
`__cxa_atexit`.
llvm-svn: 312941
Diffstat (limited to 'clang/test/Driver/cxa-atexit.cpp')
-rw-r--r-- | clang/test/Driver/cxa-atexit.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/Driver/cxa-atexit.cpp b/clang/test/Driver/cxa-atexit.cpp new file mode 100644 index 00000000000..01d4e20e771 --- /dev/null +++ b/clang/test/Driver/cxa-atexit.cpp @@ -0,0 +1,27 @@ +// RUN: %clang -### -target armv7-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target armv7-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target armv7-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target armv7-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target i686-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target i686-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target i686-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target i686-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target x86_64-unknown-windows-msvc -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target x86_64-unknown-windows-itanium -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target x86_64-unknown-windows-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target x86_64-unknown-windows-cygnus -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-WINDOWS +// RUN: %clang -### -target hexagon-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-HEXAGON +// RUN: %clang -### -target xcore-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-XCORE +// RUN: %clang -### -target armv7-mti-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MTI +// RUN: %clang -### -target mips-unknown-none -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS +// RUN: %clang -### -target mips-unknown-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS +// RUN: %clang -### -target mips-mti-none-gnu -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MIPS +// RUN: %clang -### -target sparc-sun-solaris -c %s -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-SOLARIS + +// CHECK-WINDOWS: "-fno-use-cxa-atexit" +// CHECK-SOLARIS: "-fno-use-cxa-atexit" +// CHECK-HEXAGON: "-fno-use-cxa-atexit" +// CHECK-XCORE: "-fno-use-cxa-atexit" +// CHECK-MTI: "-fno-use-cxa-atexit" +// CHECK-MIPS-NOT: "-fno-use-cxa-atexit" + |