[clang] [clang][PS5] Clang driver PS5 - pass the target CPU to lld. (PR #202924)

Edd Dawson via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 04:07:55 PDT 2026


================
@@ -178,6 +179,9 @@ void tools::PS4cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   if (StringRef Threads = getLTOParallelism(Args, D); !Threads.empty())
     AddLTOFlag(Twine("-threads=") + Threads);
 
+  std::string CPU = tools::x86::getX86TargetCPU(D, Args, TC.getTriple());
+  AddLTOFlag(Twine("mcpu=" + CPU));
+
----------------
playstation-edd wrote:

Was the intention to make this change to `tools::PS5cpu::Linker::ConstructJob`, instead of `tools::PS4cpu::Linker::ConstructJob`?

The PS4 linker sets this internally, itself.

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


More information about the cfe-commits mailing list