[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / ps4-ps5-linker.c
blobee8e96bbfbd027814f6aafaccdd3657e12f38d5a
1 // Test the driver's control over the JustMyCode behavior with linker flags.
3 // RUN: %clang --target=x86_64-scei-ps4 -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PS4,CHECK-PS4-LIB %s
4 // RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PS4-THIN-LTO,CHECK-PS4-LIB %s
5 // RUN: %clang --target=x86_64-scei-ps4 -flto=full -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PS4-FULL-LTO,CHECK-PS4-LIB %s
6 // RUN: %clang --target=x86_64-scei-ps5 -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PS5,CHECK-PS5-LIB %s
7 // RUN: %clang --target=x86_64-scei-ps5 -flto -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PS5-LTO,CHECK-PS5-LIB %s
9 // CHECK-PS4-NOT: -enable-jmc-instrument
10 // CHECK-PS4-THIN-LTO: -lto-thin-debug-options=-enable-jmc-instrument
11 // CHECK-PS4-FULL-LTO: -lto-debug-options=-enable-jmc-instrument
12 // CHECK-PS5-NOT: -plugin-opt=-enable-jmc-instrument
13 // CHECK-PS5-LTO: -plugin-opt=-enable-jmc-instrument
15 // Check the default library name.
16 // CHECK-PS4-LIB: "--whole-archive" "-lSceDbgJmc" "--no-whole-archive"
17 // CHECK-PS5-LIB: "--whole-archive" "-lSceJmc_nosubmission" "--no-whole-archive"
19 // Test the driver's control over the -fcrash-diagnostics-dir behavior with linker flags.
21 // RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-PS4-THIN-LTO %s
22 // RUN: %clang --target=x86_64-scei-ps4 -flto=full -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-PS4-FULL-LTO %s
23 // RUN: %clang --target=x86_64-scei-ps5 -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-PS5 %s
24 // RUN: %clang --target=x86_64-scei-ps5 -flto -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-PS5-LTO %s
26 // CHECK-DIAG-PS4-THIN-LTO: -lto-thin-debug-options=-crash-diagnostics-dir=mydumps
27 // CHECK-DIAG-PS4-FULL-LTO: -lto-debug-options=-crash-diagnostics-dir=mydumps
28 // CHECK-DIAG-PS5-NOT: -plugin-opt=-crash-diagnostics-dir=mydumps
29 // CHECK-DIAG-PS5-LTO: -plugin-opt=-crash-diagnostics-dir=mydumps