[clang] [PS5] Enable support for DTLTO in the PS5 Clang driver (PR #158041)

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 11 09:05:52 PDT 2025


================
@@ -343,6 +343,17 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   // whether or not that will be the case at this point. So, unconditionally
   // pass LTO options to ensure proper codegen, metadata production, etc if
   // LTO indeed occurs.
+
+  if (Arg *A = Args.getLastArg(options::OPT_fthinlto_distributor_EQ)) {
+    CmdArgs.push_back(
+        Args.MakeArgString("--thinlto-distributor=" + Twine(A->getValue())));
+    CmdArgs.push_back(Args.MakeArgString("--thinlto-remote-compiler=" +
+                                         Twine(D.getClangProgramPath())));
+
+    for (auto A : Args.getAllArgValues(options::OPT_Xthinlto_distributor_EQ))
----------------
bd1976bris wrote:

Nice. Thanks. I have made the same change for the equivalent code in `addLTOOptions`.

https://github.com/llvm/llvm-project/pull/158041


More information about the cfe-commits mailing list