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

Edd Dawson via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 14:11:58 PDT 2024


================
@@ -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, false);
 
+  const bool UnifiedLTO = Args.hasFlag(options::OPT_funified_lto,
----------------
playstation-edd wrote:

I believe that `hasArg(options::OPT_fno_unified_lto)` won't have last-one-wins behaviour. For example, `... -fno-unified-lto -funified-lto ...` would result in `UnifiedLTO` being set to `false`, incorrectly.

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


More information about the cfe-commits mailing list