| 1 |
// RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP |
| 2 |
// NOSP-NOT: "-fsanitize=safe-stack" |
| 3 |
|
| 4 |
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP |
| 5 |
// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN |
| 6 |
// RUN: %clang --target=x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP |
| 7 |
// RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP |
| 8 |
// RUN: %clang --target=arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP |
| 9 |
// RUN: %clang --target=aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP |
| 10 |
// NO-SP-NOT: stack-protector |
| 11 |
// NO-SP: "-fsanitize=safe-stack" |
| 12 |
// SP-ASAN: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address' |
| 13 |
// SP: -stack-protector |
| 14 |
// SP: "-fsanitize=safe-stack" |
| 15 |
// NO-SP-NOT: stack-protector |