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