| 1 |
// Test the driver's control over the JustMyCode behavior with linker flags. |
| 2 |
|
| 3 |
// RUN: %clang --target=x86_64-scei-ps4 -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIB %s |
| 4 |
// RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-THIN-LTO,CHECK-LIB %s |
| 5 |
// RUN: %clang --target=x86_64-scei-ps4 -flto=full -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-FULL-LTO,CHECK-LIB %s |
| 6 |
|
| 7 |
// CHECK-NOT: -enable-jmc-instrument |
| 8 |
// CHECK-THIN-LTO: "-lto-thin-debug-options= -generate-arange-section -enable-jmc-instrument" |
| 9 |
// CHECK-FULL-LTO: "-lto-debug-options= -generate-arange-section -enable-jmc-instrument" |
| 10 |
|
| 11 |
// Check the default library name. |
| 12 |
// CHECK-LIB: "--whole-archive" "-lSceDbgJmc" "--no-whole-archive" |
| 13 |
|
| 14 |
// Test the driver's control over the -fcrash-diagnostics-dir behavior with linker flags. |
| 15 |
|
| 16 |
// RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-THIN-LTO %s |
| 17 |
// RUN: %clang --target=x86_64-scei-ps4 -flto=full -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-FULL-LTO %s |
| 18 |
|
| 19 |
// CHECK-DIAG-THIN-LTO: "-lto-thin-debug-options= -generate-arange-section -crash-diagnostics-dir=mydumps" |
| 20 |
// CHECK-DIAG-FULL-LTO: "-lto-debug-options= -generate-arange-section -crash-diagnostics-dir=mydumps" |