| 1 |
// Check that -stack-protector doesn't get passed down to device-side |
| 2 |
// compilation. |
| 3 |
// |
| 4 |
// |
| 5 |
// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ |
| 6 |
// RUN: -fstack-protector-all %s 2>&1 | \ |
| 7 |
// RUN: FileCheck %s |
| 8 |
// |
| 9 |
// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ |
| 10 |
// RUN: -fstack-protector-strong %s 2>&1 | \ |
| 11 |
// RUN: FileCheck %s |
| 12 |
// |
| 13 |
// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ |
| 14 |
// RUN: -fstack-protector %s 2>&1 | \ |
| 15 |
// RUN: FileCheck %s |
| 16 |
// |
| 17 |
// CHECK-NOT: error: unsupported option '-fstack-protector |
| 18 |
// CHECK-DAG: "-fcuda-is-device" |
| 19 |
// CHECK-NOT: "-stack-protector" |
| 20 |
// CHECK-NOT: "-stack-protector-buffer-size" |
| 21 |
// CHECK-DAG: "-triple" "x86_64-unknown-linux-gnu" |
| 22 |
// CHECK: "-stack-protector" |