blob: 7fecd1b02132eb0895877674b712a3a54472a088 [file] [log] [blame]
Chad Rosiera7afeb02012-08-21 16:16:06 +00001// RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP
Stephen Hinesef822542014-07-21 00:47:37 -07002// NOSSP-NOT: "-stack-protector"
Chad Rosiera7afeb02012-08-21 16:16:06 +00003// NOSSP-NOT: "-stack-protector-buffer-size"
4
Stephen Hinesef822542014-07-21 00:47:37 -07005// RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
Chad Rosiera7afeb02012-08-21 16:16:06 +00006// SSP: "-stack-protector" "1"
7// SSP-NOT: "-stack-protector-buffer-size"
8
Stephen Hinesef822542014-07-21 00:47:37 -07009// RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
Chad Rosiera7afeb02012-08-21 16:16:06 +000010// SSP-BUF: "-stack-protector" "1"
11// SSP-BUF: "-stack-protector-buffer-size" "16"
Rafael Espindola9adba392013-06-05 04:28:55 +000012
13// RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD
Stephen Hines6bcf27b2014-05-29 04:14:42 -070014// OPENBSD: "-stack-protector" "2"
15
16// RUN: %clang -target i386-pc-openbsd -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_SPS
17// OPENBSD_SPS: "-stack-protector" "2"
Rafael Espindola9adba392013-06-05 04:28:55 +000018
Stephen Hines651f13c2014-04-23 16:59:28 -070019// 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"