[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-04 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/107112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/107410 The following discrepancies concerning `-isysroot` and `--sysroot` motivated this change: - The SDK directory can be specified via `-isysroot`, but `--sysroot` has no influence over this. Yet, we check

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd edited https://github.com/llvm/llvm-project/pull/107410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/107410 >From a20158570f15b4200937650b90e07b99e230e3df Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 4 Sep 2024 12:30:11 +0100 Subject: [PATCH 1/2] [PS4,PS5][Driver] Detangle --sysroot and -isysroot The

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > According to [gcc > docs](https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html) `--sysroot` > applies to headers and libraries, and `-isysroot` overrides it for headers > only. This is different from the "independence" described for World 2. That > is, if we have

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Edd Dawson via cfe-commits
@@ -323,46 +323,63 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, StringRef Platform, const char *EnvVar) : Generic_ELF(D, Triple, Args) { - // D

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-06 Thread Edd Dawson via cfe-commits
@@ -323,46 +323,63 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, StringRef Platform, const char *EnvVar) : Generic_ELF(D, Triple, Args) { - // D

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-09 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/107410 >From a20158570f15b4200937650b90e07b99e230e3df Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 4 Sep 2024 12:30:11 +0100 Subject: [PATCH 1/3] [PS4,PS5][Driver] Detangle --sysroot and -isysroot The

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-09 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/107410 >From a20158570f15b4200937650b90e07b99e230e3df Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 4 Sep 2024 12:30:11 +0100 Subject: [PATCH 1/4] [PS4,PS5][Driver] Detangle --sysroot and -isysroot The

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-09 Thread Edd Dawson via cfe-commits
@@ -1,42 +1,64 @@ -// Check that PS4 clang doesn't report a warning message when locating -// system header files (either by looking at the value of SCE_ORBIS_SDK_DIR -// or relative to the location of the compiler driver), if "-nostdinc", -// "--sysroot" or "-isysroot" option is

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-12 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/102020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-12 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/102901 The PS5 linker currently forces `-pie` for typical link jobs. Have the driver pass `pie` under the same conditions. With this change we can remove our private linker patch and also allow `-no-pie` to ha

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/100160 Some of SIE's post-mortem analysis infrastructure currently makes use of .debug_aranges, so we'd like to ensure the section's presence in PlayStation binaries. The simplest way to do this is to force em

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/100160 >From 3a336780b4c3596863294afc47969967dac5f9bb Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Fri, 19 Jul 2024 17:52:00 +0100 Subject: [PATCH 1/4] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-23 Thread Edd Dawson via cfe-commits
@@ -0,0 +1,33 @@ +; This checks that .debug_aranges is always generated for the SCE debugger playstation-edd wrote: Done! https://github.com/llvm/llvm-project/pull/100160 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #100160)

2024-07-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/100160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/100423 The driver doesn't know if LTO will occur at link time. That's determined by the presence or absence of LLVM bitcode objects among those ingested by the linker. For this reason, LTO options for codegen

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Edd Dawson via cfe-commits
@@ -152,48 +152,38 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Output.getFilename()); } - const bool UseLTO = D.isUsingLTO(); const bool UseJMC = Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, fals

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Edd Dawson via cfe-commits
@@ -152,48 +152,38 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Output.getFilename()); } - const bool UseLTO = D.isUsingLTO(); const bool UseJMC = Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, fals

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/100423 >From daa53d8cf7850a4bb11a7780410b969602138565 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 24 Jul 2024 16:39:09 +0100 Subject: [PATCH 1/3] [PS4/PS5][Driver] Always pass LTO options to the linker

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-24 Thread Edd Dawson via cfe-commits
@@ -152,48 +152,38 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Output.getFilename()); } - const bool UseLTO = D.isUsingLTO(); const bool UseJMC = Args.hasFlag(options::OPT_fjmc, options::OPT_fno_jmc, fals

[clang] [PS4/PS5][Driver] Always pass LTO options to the linker (PR #100423)

2024-07-25 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/100423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Ensure stack sizes are emitted by LTO (PR #100592)

2024-07-25 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/100592 ... when requested. Upstreaming a private patch. SIE tracker: TOOLCHAIN-16575 >From cc1cbf728c0e7aa13260af2101c0e312ae81 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 25 Jul 2024 16:58:57 +

[clang] [PS5][Driver] Ensure stack sizes are emitted by LTO (PR #100592)

2024-07-26 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/100592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][Driver] Allow unified-lto.c test to find .*ld.exe (PR #101034)

2024-07-29 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/101034 It's common in SIE development environments to have the PlayStation linkers on the %PATH%. In such cases, the driver will resolve the linker name to an existing executable, replete with ".exe" extension

[clang] [PS4][Driver] Only pass -lto-debug-options to linker when necessary (PR #101202)

2024-07-30 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/101202 The PS4 linker doesn't accept an empty LTO options string. Passing nothing is also consistent with other drivers. SIE tracker: TOOLCHAIN-16575 >From 4ee96bd211de1c1499c1860988af1f8369e20d93 Mon Sep 17

[clang] [PS4][Driver] Only pass -lto-debug-options to linker when necessary (PR #101202)

2024-07-30 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/101202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE tuning (PR #99629)

2024-07-19 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/99629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (PR #99711)

2024-07-19 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/99711 …uning (#99629)" This reverts commit 22eb290a9696e2a3fd042096c61e35eca2fcce0c. >From 9025e82a8b7a560963160ea2a3b180fdaf3fc1d4 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Fri, 19 Jul 2024 22:36:22 +0

[clang] [llvm] Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (PR #99711)

2024-07-19 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/99711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (PR #99711)

2024-07-22 Thread Edd Dawson via cfe-commits
playstation-edd wrote: Apologies - will do. For the record, there was a failure on builder llvm-clang-x86_64-sie-win. https://lab.llvm.org/buildbot/#/builders/46/builds/1956 https://github.com/llvm/llvm-project/pull/99711 ___ cfe-commits mailing list

[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-03 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/107112 The PlayStation drivers emit warnings if it looks like SDK libraries are missing. Until this point, the check was skipped when either -nostdlib or -nodefaultlibs was supplied. I believe the idea is that

[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-03 Thread Edd Dawson via cfe-commits
@@ -36,9 +35,6 @@ // RUN: env SCE_ORBIS_SDK_DIR=.. %clang -Winvalid-or-nonexistent-directory -### -emit-ast -isysroot foo -target x86_64-scei-ps4 %s 2>&1 | FileCheck -check-prefix=WARN-ISYSROOT -check-prefix=NO-WARN %s // RUN: env SCE_ORBIS_SDK_DIR=.. %clang -Winvalid-or-nonex

[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-03 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd edited https://github.com/llvm/llvm-project/pull/107112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (PR #107112)

2024-09-03 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd edited https://github.com/llvm/llvm-project/pull/107112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/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, se

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > If you wish to, you can add reviewers by using the "Reviewers" section on > this page. > > If this is not working for you, it is probably because you do not have write > permissions for the repository. In which case you can instead tag reviewers > by name in a comment

[clang] [PS4/PS5][NFC] Split PScpu::Linker into PS4/PS5 classes (PR #98884)

2024-07-15 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > Looks like you don't have write permission so I'll merge it for you. Thanks! https://github.com/llvm/llvm-project/pull/98884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/102020 On PlayStation, allow users to supply -static to the linker, via the driver. An initial step. Later changes will have the PS5 driver supply additional options to the linker, if and when -static is passe

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/102020 >From aa97906cdf1ac08e0b5d607914c28dcb2bbc2545 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Mon, 5 Aug 2024 17:42:55 +0100 Subject: [PATCH 1/2] [PS4/PS5][Driver] Allow -static in PlayStation drivers

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/102020 >From aa97906cdf1ac08e0b5d607914c28dcb2bbc2545 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Mon, 5 Aug 2024 17:42:55 +0100 Subject: [PATCH 1/3] [PS4/PS5][Driver] Allow -static in PlayStation drivers

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-06 Thread Edd Dawson via cfe-commits
@@ -141,6 +141,9 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_pie)) CmdArgs.push_back("-pie"); + playstation-edd wrote: Oops - thanks. Removed. https://github.com/llvm/llvm-project/pull/

[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)

2024-08-06 Thread Edd Dawson via cfe-commits
@@ -141,6 +141,9 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Args.hasArg(options::OPT_pie)) CmdArgs.push_back("-pie"); + + if (Args.hasArg(options::OPT_static)) +CmdArgs.push_back("--static"); playstation-ed

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-21 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/102901 >From 0ca2239d21cb414ce5e6fb9057d442c18f61a32e Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Mon, 12 Aug 2024 14:11:11 +0100 Subject: [PATCH 1/3] [PS5][Driver] Link main components with -pie by default

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-21 Thread Edd Dawson via cfe-commits
@@ -237,7 +237,10 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!D.SysRoot.empty()) CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); - if (Args.hasArg(options::OPT_pie)) + // Default to PIE for non-static main com

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-21 Thread Edd Dawson via cfe-commits
@@ -1,3 +1,18 @@ +// Test that PIE is the default for main components + +// RUN: %clang --target=x86_64-scei-ps5 %s -### 2>&1 | FileCheck --check-prefixes=CHECK-PIE %s + +// CHECK-PIE: {{ld(\.exe)?}}" +// CHECK-PIE-SAME: "-pie" + +// RUN: %clang --target=x86_64-scei-ps5 -no-pie %

[clang] [PS5][Driver] Link main components with -pie by default (PR #102901)

2024-08-21 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/102901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][clang][test] x86_64-scei-ps5 -> x86_64-sie-ps5 in tests (PR #105810)

2024-08-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/105810 `x86_64-sie-ps5` is the triple we share with PS5 toolchain users who have reason to care about such things. The vast majority of PS5 checks and tests already use this variant. Quashing the handful of st

[clang] [PS5][clang][test] x86_64-scei-ps5 -> x86_64-sie-ps5 in tests (PR #105810)

2024-08-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/105810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-21 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/113162 Until now, these options have been hardcoded as downstream patches in LLD. Add them to the driver so that the private patches can be removed. PS5 only. These implementation of these behaviours will rema

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-21 Thread Edd Dawson via cfe-commits
playstation-edd wrote: @pogo59 - I recall you expressed an interest in being subscribed to such PRs. Please do let me know if it gets tiresome! https://github.com/llvm/llvm-project/pull/113162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/113162 >From 0d931fb93485472e2e7263496eb6d2bc71a9ae73 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Mon, 21 Oct 2024 13:08:31 +0100 Subject: [PATCH 1/3] [PS5][Driver] Pass default -z options to PS5 linker Un

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
@@ -240,11 +242,32 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString("--sysroot=" + TC.getSDKLibraryRootDir())); - // Default to PIE for non-static executables. - const bool PIE = - !Args.hasA

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
@@ -240,11 +242,32 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back( Args.MakeArgString("--sysroot=" + TC.getSDKLibraryRootDir())); - // Default to PIE for non-static executables. - const bool PIE = - !Args.hasA

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd edited https://github.com/llvm/llvm-project/pull/113162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/113162 >From 0d931fb93485472e2e7263496eb6d2bc71a9ae73 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Mon, 21 Oct 2024 13:08:31 +0100 Subject: [PATCH 1/2] [PS5][Driver] Pass default -z options to PS5 linker Un

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/113162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4/PS5][Driver] Apply clang-format to PS4CPU.cpp (NFC) (PR #114038)

2024-10-29 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/114038 None >From cb44afa8945af89dada57335eb410ba2fc802188 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Tue, 29 Oct 2024 11:52:43 + Subject: [PATCH] [PS4/PS5][Driver] Apply clang-format to PS4CPU.cpp (N

[clang] [PS5][Driver] Pass default -z options to PS5 linker (PR #113162)

2024-10-22 Thread Edd Dawson via cfe-commits
playstation-edd wrote: Note to self: fix typo in comment on submission ("The~se~ implementation ..."). https://github.com/llvm/llvm-project/pull/113162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [PS5][Driver] Update default linking options for `-r` (PR #113595)

2024-10-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/113595 Until now, these options have been hardcoded as downstream patches in lld. Add them to the driver so that the private patches can be removed. PS5 only. On PS4, the proprietary linker will continue to pe

[clang] [PS5][Driver] Update default linking options when `-r` omitted. (PR #113595)

2024-10-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd edited https://github.com/llvm/llvm-project/pull/113595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass a target emulation to the linker (PR #114060)

2024-10-29 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/114060 Until now, this has been hardcoded as a downstream patch in lld. Add it to the driver so that the private patch can be removed. PS5 only. On PS4, the equivalent hardcoded configuration will remain in th

[clang] [PS5][Driver] Update default linking options when `-r` omitted. (PR #113595)

2024-10-29 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/113595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Supply default linker scripts (PR #114546)

2024-11-04 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/114546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass `-z rodynamic` to the linker (PR #115009)

2024-11-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/115009 Until now, suppression of `DT_DEBUG` has been hardcoded as a downstream patch in lld. This can instead be achieved by passing `-z rodynamic`. Have the driver do this so that the private patch can be rem

[clang] [PS5][Driver] Pass `-z rodynamic` to the linker (PR #115009)

2024-11-05 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/115009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-10-31 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/114435 Until now, these have been hardcoded as a downstream patches in lld. Add them to the driver so that the private patch can be removed. PS5 only. On PS4, the equivalent hardcoded configuration will remain

[clang] [PS5][Driver] Supply default linker scripts (PR #114546)

2024-11-01 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/114546 Until now, this has been hardcoded as a downstream patch in lld. Add it to the driver so that the private patch can be removed. PS5 only. On PS4, the equivalent hardcoded configuration will remain in th

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/114435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Query `OPT_r`/`OPT_shared`/`OPT_static` just once (NFC) (PR #113452)

2024-10-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/113452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Query `OPT_r`/`OPT_shared`/`OPT_static` just once (NFC) (PR #113452)

2024-10-23 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/113452 None >From 3552f590214267e5f81719d94c43be545e474cb3 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 23 Oct 2024 13:42:49 +0100 Subject: [PATCH] [PS5][Driver] Query `OPT_r`/`OPT_shared`/`OPT_static`

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115497 >From 112e3e7ca9e3fd041fb0a1a0b7d97aa26740a908 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 7 Nov 2024 13:57:45 + Subject: [PATCH 1/4] [PS5][Driver] Supply libraries and CRT objects to the l

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-08 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/115497 Until now, these have been hardcoded as a downstream patches in lld. Add them to the driver so that the private patches can be removed. PS5 only. On PS4, the equivalent hardcoded configuration will rema

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115497 >From 112e3e7ca9e3fd041fb0a1a0b7d97aa26740a908 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 7 Nov 2024 13:57:45 + Subject: [PATCH 1/2] [PS5][Driver] Supply libraries and CRT objects to the l

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115497 >From 112e3e7ca9e3fd041fb0a1a0b7d97aa26740a908 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 7 Nov 2024 13:57:45 + Subject: [PATCH 1/3] [PS5][Driver] Supply libraries and CRT objects to the l

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
@@ -97,6 +97,60 @@ // Check the default library name. // CHECK-JMC: "--push-state" "--whole-archive" "-lSceJmc_nosubmission" "--pop-state" +// Test that CRT objects and libraries are supplied to the linker and can be +// omitted with -noxxx options. These switches have some i

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > Just to check my understanding, things like CHECK-MAIN-CRT-SAME are going to > shift the match-position that FileCheck is looking at forwards, so that we > have to match in the correct order, yes? Yep! > I get the feeling that given how much of the construct-a-job log

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > Does the flipped order of library-option-names in > [100c3c2](https://github.com/llvm/llvm-project/commit/100c3c271437b3b6181a5a57381363f4b6e9e841) > have an actual effect on behaviour? Just curious. No effect. I accidentally flipped the order it in the initial commit

[clang] [PS5][Driver] Supply libraries and CRT objects to the linker (PR #115497)

2024-11-11 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115497 >From 112e3e7ca9e3fd041fb0a1a0b7d97aa26740a908 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 7 Nov 2024 13:57:45 + Subject: [PATCH 1/5] [PS5][Driver] Supply libraries and CRT objects to the l

[clang] [PS5][Driver] Update default linking options for `-r` (PR #113595)

2024-10-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/113595 >From 5c5a6f89ca752bf9d0452f486648f2608b7bc609 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 24 Oct 2024 10:15:16 +0100 Subject: [PATCH] [PS5][Driver] Update default linking options when `-r` omi

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread Edd Dawson via cfe-commits
@@ -67,19 +67,24 @@ // CHECK-NO-EXE-NOT: "--unresolved-symbols // CHECK-NO-EXE-NOT: "-z" -// Test that an appropriate linker script is supplied by the driver. +// Test that an appropriate linker script is supplied by the driver, but can +// be overridden with -T. -

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/116074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/116074 If a linker script is explicitly supplied, there's no benefit to supplying a default script. SIE tracker: TOOLCHAIN-17524 >From a843f4fcd5bc0c43ad0177cb3e284efe65676138 Mon Sep 17 00:00:00 2001 From: E

[clang] [PS5][Driver] Pass a target emulation to the linker (PR #114060)

2024-10-31 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/114060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/114435 >From ebbb513f4f938c8d17a21b6061a815ffc7d8b004 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 31 Oct 2024 16:09:30 + Subject: [PATCH 1/3] [PS5][Driver] Pass layout metrics to the linker Until

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/114435 >From ebbb513f4f938c8d17a21b6061a815ffc7d8b004 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 31 Oct 2024 16:09:30 + Subject: [PATCH 1/2] [PS5][Driver] Pass layout metrics to the linker Until

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
@@ -21,6 +21,22 @@ // CHECK-NO-PIE-NOT: "-pie" // CHECK-SHARED: "--shared" +// Test the driver supplies an --image-base to the linker only for non-pie +// executables. + +// RUN: %clang --target=x86_64-sie-ps5 -static %s -### 2>&1 | FileCheck --check-prefixes=CHECK-BASE %s +/

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
@@ -295,6 +302,9 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (Shared) CmdArgs.push_back("--shared"); + if (!Relocatable && !Shared && !PIE) playstation-edd wrote: The intention is to supply a base for non-PIE ex

[clang] [PS5][Driver] Pass layout metrics to the linker (PR #114435)

2024-11-01 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/114435 >From ebbb513f4f938c8d17a21b6061a815ffc7d8b004 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Thu, 31 Oct 2024 16:09:30 + Subject: [PATCH 1/4] [PS5][Driver] Pass layout metrics to the linker Until

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/109796 >From 89ff568fda0062a89ed690cdb0267fc41a89325c Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Tue, 24 Sep 2024 13:05:39 +0100 Subject: [PATCH 1/2] [PS4,PS5][Driver] Pass `-L<...>/target/lib -L.` to link

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/109796 The proprietary PS4 linker implicitly adds `=/target/lib` and `.` as library search paths. This behaviour was added to the PS5 linker via a downstream patch in LLD. This really belongs in the driver, in

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-24 Thread Edd Dawson via cfe-commits
@@ -46,3 +46,26 @@ // CHECK-SYSROOT: {{ld(\.exe)?}}" // CHECK-SYSROOT-SAME: "--sysroot=mysdk" + +// Test that "." is always added to library search paths. This is long-standing +// behavior, unique to PlayStation toolchains. + +// RUN: %clang --target=x64_64-sie-ps5 %s -### 2>

[clang] [PS4, PS5][Driver] Pass `-L<...>/target/lib -L.` to linker (PR #109796)

2024-09-25 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/109796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4,PS5][Driver] Fix typo in comment (NFC) (PR #109980)

2024-09-25 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/109980 None >From 2a333786d415215f722796587c0a37b676d506a5 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 25 Sep 2024 14:27:43 +0100 Subject: [PATCH] [PS4,PS5][Driver] Fix typo in comment (NFC) --- cla

[clang] [PS5][Driver] Restore whole-archive state when `-fjmc` (PR #115181)

2024-11-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd created https://github.com/llvm/llvm-project/pull/115181 `--whole-archive` is passed to the linker to have it consume all objects within the SIE Just My Code library, rather than just those that fulfil outstanding references. Prior to this change, `--no-whol

[clang] [PS5][Driver] Restore whole-archive state when `-fjmc` (PR #115181)

2024-11-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd updated https://github.com/llvm/llvm-project/pull/115181 >From c2eec3d06ad920ef2b7826fe9b76f1b45574e036 Mon Sep 17 00:00:00 2001 From: Edd Dawson Date: Wed, 6 Nov 2024 16:24:46 + Subject: [PATCH 1/2] [PS5][Driver] Restore whole-archive state when `-fjmc`

[clang] [PS5][Driver] Restore whole-archive state when `-fjmc` (PR #115181)

2024-11-06 Thread Edd Dawson via cfe-commits
playstation-edd wrote: > LGTM, although maybe CHECK_JMC instead of CHECK_LIB as it seems very JMC > specific? No strong opinion. Done - thanks. https://github.com/llvm/llvm-project/pull/115181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [PS5][Driver] Restore whole-archive state when `-fjmc` (PR #115181)

2024-11-06 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/115181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PS4, PS5][Driver] Detangle --sysroot and -isysroot (PR #107410)

2024-09-17 Thread Edd Dawson via cfe-commits
https://github.com/playstation-edd closed https://github.com/llvm/llvm-project/pull/107410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >