[clang] [PS4/PS5][Driver] Allow -static in PlayStation drivers (PR #102020)
Edd Dawson via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 6 01:45:04 PDT 2024
================
@@ -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-edd wrote:
> The linker option is almost always spelled as `-static`.
I have changed this.
FWIW, I took my cue from the `--help` of ld.lld, assuming it would be a suitable authority.
> Gnu.cpp:437 ([ae623d1](https://github.com/llvm/llvm-project/commit/ae623d16d50c9f12de7ae7ac1aa11c9d6857e081)) demonstrates how these options work on Linux
Over coming changes we'll evolve to something more like that, but not exactly. The users of `-static` on PlayStation are a small, distinct group, internal to SIE. Over the last decade or so `-static` has - for better or worse - evolved into something very particular, here. Once all the functionality that should be in the PS driver is actually here, there's perhaps a chance that it can be rationalized.
https://github.com/llvm/llvm-project/pull/102020
More information about the cfe-commits
mailing list