[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / aarch64-features.c
blobb5ffc95f26d04fa1a7fe2faa61a1b85cf4204b61
1 // RUN: %clang -target aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
2 // RUN: %clang -target arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
4 // CHECK: "-funwind-tables=2"
6 // The AArch64 PCS states that chars should be unsigned.
7 // CHECK: fno-signed-char
9 // Check Function Multi Versioning option and rtlib dependency.
10 // RUN: %clang -target aarch64-linux-android -rtlib=compiler-rt \
11 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV %s
13 // RUN: %clang -target aarch64-linux-android -rtlib=compiler-rt -mno-fmv \
14 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
16 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
17 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
19 // RUN: %clang -target arm64-unknown-linux -rtlib=libgcc \
20 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s
22 // CHECK-FMV-OFF: "-target-feature" "-fmv"
23 // CHECK-FMV-NOT: "-target-feature" "-fmv"
25 // Check for AArch64 out-of-line atomics default settings.
26 // RUN: %clang -target aarch64-linux-android -rtlib=compiler-rt \
27 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
29 // RUN: %clang -target aarch64-linux-gnu -rtlib=compiler-rt \
30 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
32 // RUN: %clang -target arm64-unknown-linux -rtlib=compiler-rt \
33 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
35 // RUN: %clang -target aarch64--none-eabi -rtlib=compiler-rt \
36 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
38 // RUN: %clang -target aarch64-apple-darwin -rtlib=compiler-rt \
39 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
41 // RUN: %clang -target aarch64-windows-gnu -rtlib=compiler-rt \
42 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
44 // RUN: %clang -target aarch64-unknown-openbsd -rtlib=compiler-rt \
45 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
47 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
48 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
49 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
51 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
52 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
53 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
55 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
56 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.1 \
57 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
59 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
60 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.0 \
61 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
63 // RUN: %clang -target arm64-linux -rtlib=compiler-rt -mno-outline-atomics \
64 // RUN: -### -c %s 2>&1 | FileCheck \
65 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
67 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc -mno-outline-atomics \
68 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
69 // RUN: -### -c %s 2>&1 | FileCheck \
70 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
72 // RUN: %clang -target aarch64-apple-darwin -rtlib=compiler-rt -moutline-atomics \
73 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
75 // RUN: %clang -target aarch64-windows-gnu -rtlib=libgcc -moutline-atomics \
76 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
77 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
79 // CHECK-OUTLINE-ATOMICS-ON: "-target-feature" "+outline-atomics"
80 // CHECK-OUTLINE-ATOMICS-OFF-NOT: "-target-feature" "+outline-atomics"
81 // CHECK-NO-OUTLINE-ATOMICS: "-target-feature" "-outline-atomics"