Chad Rosier | db3da83 | 2012-08-21 16:16:06 +0000 | [diff] [blame] | 1 | // RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP |
Rafael Espindola | d6f11a7 | 2014-06-01 13:45:09 +0000 | [diff] [blame] | 2 | // NOSSP-NOT: "-stack-protector" |
Chad Rosier | db3da83 | 2012-08-21 16:16:06 +0000 | [diff] [blame] | 3 | // NOSSP-NOT: "-stack-protector-buffer-size" |
| 4 | |
Rafael Espindola | d6f11a7 | 2014-06-01 13:45:09 +0000 | [diff] [blame] | 5 | // RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP |
Chad Rosier | db3da83 | 2012-08-21 16:16:06 +0000 | [diff] [blame] | 6 | // SSP: "-stack-protector" "1" |
| 7 | // SSP-NOT: "-stack-protector-buffer-size" |
| 8 | |
Rafael Espindola | d6f11a7 | 2014-06-01 13:45:09 +0000 | [diff] [blame] | 9 | // RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF |
Chad Rosier | db3da83 | 2012-08-21 16:16:06 +0000 | [diff] [blame] | 10 | // SSP-BUF: "-stack-protector" "1" |
| 11 | // SSP-BUF: "-stack-protector-buffer-size" "16" |
Rafael Espindola | 044f783 | 2013-06-05 04:28:55 +0000 | [diff] [blame] | 12 | |
| 13 | // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD |
Rafael Espindola | 2d401f5 | 2014-05-22 12:52:35 +0000 | [diff] [blame] | 14 | // OPENBSD: "-stack-protector" "2" |
Rafael Espindola | 044f783 | 2013-06-05 04:28:55 +0000 | [diff] [blame] | 15 | |
Rafael Espindola | ce5c609 | 2014-05-22 22:57:39 +0000 | [diff] [blame] | 16 | // RUN: %clang -target i386-pc-openbsd -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_SPS |
| 17 | // OPENBSD_SPS: "-stack-protector" "2" |
| 18 | |
Josh Magee | e0fc1a8 | 2014-02-11 01:35:14 +0000 | [diff] [blame] | 19 | // RUN: %clang -fstack-protector-strong -### %s 2>&1 | FileCheck %s -check-prefix=SSP-STRONG |
| 20 | // SSP-STRONG: "-stack-protector" "2" |
| 21 | // SSP-STRONG-NOT: "-stack-protector-buffer-size" |
| 22 | |
| 23 | // RUN: %clang -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SSP-ALL |
| 24 | // SSP-ALL: "-stack-protector" "3" |
| 25 | // SSP-ALL-NOT: "-stack-protector-buffer-size" |
Filipe Cabecinhas | c888e19 | 2015-10-14 12:25:43 +0000 | [diff] [blame] | 26 | |
| 27 | // RUN: %clang -target x86_64-scei-ps4 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-PS4 |
| 28 | // RUN: %clang -target x86_64-scei-ps4 -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP-PS4 |
| 29 | // SSP-PS4: "-stack-protector" "2" |
| 30 | // SSP-PS4-NOT: "-stack-protector-buffer-size" |
| 31 | |
| 32 | // RUN: %clang -target x86_64-scei-ps4 -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-PS4-BUF |
| 33 | // SSP-PS4-BUF: "-stack-protector" "2" |
| 34 | // SSP-PS4-BUF: "-stack-protector-buffer-size" "16" |