-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (#98884)
It has long been the case on PlayStation that the linker itself has taken on much of the responsibility that is traditionally the domain of the C language driver elsewhere: which linker script to use, selection of CRT objects, and so forth. This is changing on PS5. The driver will assume responsibility for such things. However, the situation on PS4 will remain as-is. To accommodate this divergence, we must first separate how linker Jobs are created. `clang/test/Driver/ps4-linker.c` has been similarly split for related reasons. In subsequent changes, PS5-specific linking behaviour can be moved from SIE private patches in the PS5 linker to the (upstream) driver without affecting the behaviour or implementation of PS4.
- Loading branch information
1 parent
903f6fc
commit 03fe7a8
Showing
5 changed files
with
185 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Test the driver's control over the JustMyCode behavior with linker flags. | ||
|
||
// RUN: %clang --target=x86_64-scei-ps4 -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIB %s | ||
// RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-THIN-LTO,CHECK-LIB %s | ||
// RUN: %clang --target=x86_64-scei-ps4 -flto=full -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-FULL-LTO,CHECK-LIB %s | ||
|
||
// CHECK-NOT: -enable-jmc-instrument | ||
// CHECK-THIN-LTO: "-lto-thin-debug-options= -generate-arange-section -enable-jmc-instrument" | ||
// CHECK-FULL-LTO: "-lto-debug-options= -generate-arange-section -enable-jmc-instrument" | ||
|
||
// Check the default library name. | ||
// CHECK-LIB: "--whole-archive" "-lSceDbgJmc" "--no-whole-archive" | ||
|
||
// Test the driver's control over the -fcrash-diagnostics-dir behavior with linker flags. | ||
|
||
// RUN: %clang --target=x86_64-scei-ps4 -flto=thin -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-THIN-LTO %s | ||
// RUN: %clang --target=x86_64-scei-ps4 -flto=full -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-FULL-LTO %s | ||
|
||
// CHECK-DIAG-THIN-LTO: "-lto-thin-debug-options= -generate-arange-section -crash-diagnostics-dir=mydumps" | ||
// CHECK-DIAG-FULL-LTO: "-lto-debug-options= -generate-arange-section -crash-diagnostics-dir=mydumps" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Test the driver's control over the JustMyCode behavior with linker flags. | ||
|
||
// RUN: %clang --target=x86_64-scei-ps5 -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIB %s | ||
// RUN: %clang --target=x86_64-scei-ps5 -flto -fjmc %s -### 2>&1 | FileCheck --check-prefixes=CHECK-LTO,CHECK-LIB %s | ||
|
||
// CHECK-NOT: -plugin-opt=-enable-jmc-instrument | ||
// CHECK-LTO: -plugin-opt=-enable-jmc-instrument | ||
|
||
// Check the default library name. | ||
// CHECK-LIB: "--whole-archive" "-lSceJmc_nosubmission" "--no-whole-archive" | ||
|
||
// Test the driver's control over the -fcrash-diagnostics-dir behavior with linker flags. | ||
|
||
// RUN: %clang --target=x86_64-scei-ps5 -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG %s | ||
// RUN: %clang --target=x86_64-scei-ps5 -flto -fcrash-diagnostics-dir=mydumps %s -### 2>&1 | FileCheck --check-prefixes=CHECK-DIAG-LTO %s | ||
|
||
// CHECK-DIAG-NOT: -plugin-opt=-crash-diagnostics-dir=mydumps | ||
// CHECK-DIAG-LTO: -plugin-opt=-crash-diagnostics-dir=mydumps |