| 1 |
// RUN: not %clang -### -c --target=x86_64 -Wa,--gsframe %s -Werror 2>&1 | FileCheck %s --check-prefix=NOEXP |
| 2 |
// NOEXP: error: -Wa,--allow-experimental-sframe must be specified to use -Wa,--gsframe. SFrames are experimental and may be removed at any time without warning |
| 3 |
|
| 4 |
// RUN: %clang -### -c --target=x86_64 -Wa,--gsframe -Wa,--allow-experimental-sframe %s -Werror 2>&1 | FileCheck %s |
| 5 |
// CHECK: "-cc1" |
| 6 |
// CHECK-SAME: "--gsframe" |
| 7 |
|
| 8 |
// RUN: %clang -### -c --target=x86_64 %s 2>&1 | FileCheck %s --check-prefix=NO-GSFRAME |
| 9 |
// NO-GSFRAME-NOT: "--gsframe" |
| 10 |
|
| 11 |
// RUN: %clang -### -c --target=x86_64 -Werror -Wa,--gsframe,--allow-experimental-sframe -x assembler %s -Werror 2>&1 | FileCheck %s --check-prefix=ASM |
| 12 |
// ASM: "-cc1as" |
| 13 |
// ASM-SAME: "--gsframe" |
| 14 |
|
| 15 |
// When aarch64 is supported, this will switch to a positive test. |
| 16 |
// RUN: not %clang -### -c --target=aarch64 -Wa,--gsframe %s 2>&1 | FileCheck %s --check-prefix=NOTARGETAARCH |
| 17 |
// NOTARGETAARCH: error: unsupported option '-Wa,--gsframe' for target '{{.*}}' |
| 18 |
|
| 19 |
// RUN: not %clang -### -c --target=mips64 -Wa,--gsframe %s 2>&1 | FileCheck %s --check-prefix=NOTARGETC |
| 20 |
// NOTARGETC: error: unsupported option '-Wa,--gsframe' for target '{{.*}}' |
| 21 |
|
| 22 |
// RUN: not %clang -### -c --target=mips64 -Wa,--gsframe -x assembler %s 2>&1 | FileCheck %s --check-prefix=NOTARGETASM |
| 23 |
// NOTARGETASM: error: unsupported option '-Wa,--gsframe' for target '{{.*}}' |
| 24 |
|