mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
d9bef74a21
The option does not change IR but affect object file generation. Without a backend option the option is a no-op for in-process ThinLTO. The problem is known and there are many options similar to -fstack-size-section. That said, -fstack-size-section has relatively wider adoption, so it probably makes sense to have custom code for it. Close https://github.com/llvm/llvm-project/issues/59424
22 lines
1.3 KiB
C
22 lines
1.3 KiB
C
// RUN: %clang -target x86_64-unknown %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
|
|
// RUN: %clang -target x86_64-sie-ps5 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
|
|
// RUN: %clang -target x86_64-scei-ps4 -fno-stack-size-section %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
|
|
// CHECK-ABSENT-NOT: -fstack-size-section
|
|
|
|
// RUN: %clang -target x86_64-unknown -fstack-size-section -### 2>&1 | FileCheck %s --check-prefix=CHECK-PRESENT
|
|
// RUN: %clang -target x86_64-scei-ps4 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ABSENT
|
|
// CHECK-PRESENT: -fstack-size-section
|
|
|
|
// RUN: %clang -target x86_64-unknown -fstack-size-section -fno-stack-size-section %s -### 2>&1 \
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-ABSENT
|
|
// RUN: %clang -target x86_64-unknown -fno-stack-size-section -fstack-size-section %s -### 2>&1 \
|
|
// RUN: | FileCheck %s --check-prefix=CHECK-PRESENT
|
|
|
|
// RUN: %clang -### --target=x86_64-linux-gnu -flto -fstack-size-section %s 2>&1 | FileCheck %s --check-prefix=LTO
|
|
// RUN: %clang -### --target=x86_64-linux-gnu -flto -fstack-size-section -fno-stack-size-section %s 2>&1 | FileCheck %s --check-prefix=LTO-NO
|
|
|
|
// LTO: "-plugin-opt=-stack-size-section"
|
|
// LTO-NO-NOT: "-plugin-opt=-stack-size-section"
|
|
|
|
int foo() { return 42; }
|