1 // RUN: %clang -target x86_64-unknown %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
2 // RUN: %clang -target x86_64-sie-ps5 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
3 // RUN: %clang -target x86_64-scei-ps4 -fno-stack-size-section %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
4 // CHECK-ABSENT-NOT: -fstack-size-section
6 // RUN: %clang -target x86_64-unknown -fstack-size-section -### 2>&1 | FileCheck %s --check-prefix=CHECK-PRESENT
7 // RUN: %clang -target x86_64-scei-ps4 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
8 // CHECK-PRESENT: -fstack-size-section
10 // RUN: %clang -target x86_64-unknown -fstack-size-section -fno-stack-size-section %s -### 2>&1 \
11 // RUN: | FileCheck %s --check-prefix=CHECK-ABSENT
12 // RUN: %clang -target x86_64-unknown -fno-stack-size-section -fstack-size-section %s -### 2>&1 \
13 // RUN: | FileCheck %s --check-prefix=CHECK-PRESENT
15 // RUN: %clang -### --target=x86_64-linux-gnu -flto -fstack-size-section %s 2>&1 | FileCheck %s --check-prefix=LTO
16 // RUN: %clang -### --target=x86_64-linux-gnu -flto -fstack-size-section -fno-stack-size-section %s 2>&1 | FileCheck %s --check-prefix=LTO-NO
17 // RUN: %clang -### --target=x86_64-sie-ps5 -fstack-size-section %s 2>&1 | FileCheck %s --check-prefix=LTO
19 // LTO: "-plugin-opt=-stack-size-section"
20 // LTO-NO-NOT: "-plugin-opt=-stack-size-section"
22 int foo() { return 42; }