| 1 |
// RUN: %clang --target=aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s |
| 2 |
// RUN: %clang --target=aarch64_be-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s |
| 3 |
// RUN: %clang --target=arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s |
| 4 |
|
| 5 |
// CHECK: "-funwind-tables=2" |
| 6 |
|
| 7 |
// The AArch64 PCS states that chars should be unsigned. |
| 8 |
// CHECK: fno-signed-char |
| 9 |
|
| 10 |
// Check Function Multi Versioning option and rtlib dependency. |
| 11 |
// RUN: %clang --target=aarch64-linux-android23 -rtlib=compiler-rt \ |
| 12 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV %s |
| 13 |
// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \ |
| 14 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s |
| 15 |
// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt -mno-fmv \ |
| 16 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s |
| 17 |
// RUN: %clang --target=aarch64-linux-android22 -rtlib=compiler-rt \ |
| 18 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s |
| 19 |
|
| 20 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \ |
| 21 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s |
| 22 |
// RUN: %clang --target=arm64-unknown-linux -rtlib=libgcc \ |
| 23 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-FMV-OFF %s |
| 24 |
|
| 25 |
// CHECK-FMV-OFF: "-target-feature" "-fmv" |
| 26 |
// CHECK-FMV-NOT: "-target-feature" "-fmv" |
| 27 |
|
| 28 |
// Check for AArch64 out-of-line atomics default settings. |
| 29 |
// RUN: %clang --target=aarch64-linux-android -rtlib=compiler-rt \ |
| 30 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 31 |
|
| 32 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=compiler-rt \ |
| 33 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 34 |
|
| 35 |
// RUN: %clang --target=arm64-unknown-linux -rtlib=compiler-rt \ |
| 36 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 37 |
|
| 38 |
// RUN: %clang --target=aarch64 -rtlib=compiler-rt \ |
| 39 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s |
| 40 |
|
| 41 |
// RUN: %clang --target=aarch64-apple-darwin -rtlib=compiler-rt \ |
| 42 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s |
| 43 |
|
| 44 |
// RUN: %clang --target=aarch64-windows-gnu -rtlib=compiler-rt \ |
| 45 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s |
| 46 |
|
| 47 |
// RUN: %clang --target=aarch64-unknown-freebsd -rtlib=compiler-rt \ |
| 48 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 49 |
|
| 50 |
// RUN: %clang --target=aarch64-unknown-openbsd -rtlib=compiler-rt \ |
| 51 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 52 |
|
| 53 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \ |
| 54 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \ |
| 55 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 56 |
|
| 57 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \ |
| 58 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \ |
| 59 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s |
| 60 |
|
| 61 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \ |
| 62 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.1 \ |
| 63 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 64 |
|
| 65 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc \ |
| 66 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-9.3.0 \ |
| 67 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-OFF %s |
| 68 |
|
| 69 |
// RUN: %clang --target=arm64-linux -rtlib=compiler-rt -mno-outline-atomics \ |
| 70 |
// RUN: -### -c %s 2>&1 | FileCheck \ |
| 71 |
// RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s |
| 72 |
|
| 73 |
// RUN: %clang --target=aarch64-linux-gnu -rtlib=libgcc -mno-outline-atomics \ |
| 74 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-10 \ |
| 75 |
// RUN: -### -c %s 2>&1 | FileCheck \ |
| 76 |
// RUN: -check-prefixes=CHECK-OUTLINE-ATOMICS-OFF,CHECK-NO-OUTLINE-ATOMICS %s |
| 77 |
|
| 78 |
// RUN: %clang --target=aarch64-apple-darwin -rtlib=compiler-rt -moutline-atomics \ |
| 79 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 80 |
|
| 81 |
// RUN: %clang --target=aarch64-windows-gnu -rtlib=libgcc -moutline-atomics \ |
| 82 |
// RUN: --gcc-toolchain=%S/Inputs/aarch64-linux-gnu-tree/gcc-7.5.0 \ |
| 83 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 84 |
|
| 85 |
// RUN: %clang --target=aarch64-unknown-hurd-gnu -rtlib=libgcc \ |
| 86 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 87 |
|
| 88 |
// RUN: %clang --target=aarch64-unknown-haiku -rtlib=libgcc \ |
| 89 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 90 |
|
| 91 |
// RUN: %clang --target=aarch64-unknown-managarm-mlibc -rtlib=libgcc \ |
| 92 |
// RUN: -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-OUTLINE-ATOMICS-ON %s |
| 93 |
|
| 94 |
// CHECK-OUTLINE-ATOMICS-ON: "-target-feature" "+outline-atomics" |
| 95 |
// CHECK-OUTLINE-ATOMICS-OFF-NOT: "-target-feature" "+outline-atomics" |
| 96 |
// CHECK-NO-OUTLINE-ATOMICS: "-target-feature" "-outline-atomics" |