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
3 
4 // CHECK: "-funwind-tables=2"
5 
6 // The AArch64 PCS states that chars should be unsigned.
7 // CHECK: fno-signed-char
8 
9 // Check for AArch64 out-of-line atomics default settings.
10 // RUN: %clang -target aarch64-linux-android -rtlib=compiler-rt \
11 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
12 
13 // RUN: %clang -target aarch64-linux-gnu -rtlib=compiler-rt \
14 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
15 
16 // RUN: %clang -target arm64-unknown-linux -rtlib=compiler-rt \
17 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
18 
19 // RUN: %clang -target aarch64--none-eabi -rtlib=compiler-rt \
20 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
21 
22 // RUN: %clang -target aarch64-apple-darwin -rtlib=compiler-rt \
23 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
24 
25 // RUN: %clang -target aarch64-windows-gnu -rtlib=compiler-rt \
26 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
27 
28 // RUN: %clang -target aarch64-unknown-openbsd -rtlib=compiler-rt \
29 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
30 
31 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
32 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
33 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
34 
35 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
36 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
37 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
38 
39 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
40 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.1 \
41 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
42 
43 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc \
44 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.0 \
45 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s
46 
47 // RUN: %clang -target arm64-linux -rtlib=compiler-rt -mno-outline-atomics \
48 // RUN: -### -c %s 2>&1 | FileCheck \
49 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
50 
51 // RUN: %clang -target aarch64-linux-gnu -rtlib=libgcc -mno-outline-atomics \
52 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \
53 // RUN: -### -c %s 2>&1 | FileCheck \
54 // RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s
55 
56 // RUN: %clang -target aarch64-apple-darwin -rtlib=compiler-rt -moutline-atomics \
57 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
58 
59 // RUN: %clang -target aarch64-windows-gnu -rtlib=libgcc -moutline-atomics \
60 // RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \
61 // RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s
62 
63 // CHECK-OUTLINE-ATOMICS-ON: "-target-feature" "+outline-atomics"
64 // CHECK-OUTLINE-ATOMICS-OFF-NOT: "-target-feature" "+outline-atomics"
65 // CHECK-NO-OUTLINE-ATOMICS: "-target-feature" "-outline-atomics"
66