[flang-commits] [clang] [flang] [Flang][Driver] Support for -fsplit-lto-unit option in flang driver (PR #202858)

via flang-commits flang-commits at lists.llvm.org
Fri Jun 12 23:02:44 PDT 2026


================
@@ -282,6 +282,14 @@ void Flang::addLTOOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
     CmdArgs.push_back("-flto=full");
   else if (LTOMode == LTOK_Thin)
     CmdArgs.push_back("-flto=thin");
+
+  if (Arg *splitLTOArg = Args.getLastArg(options::OPT_fsplit_lto_unit,
+                                         options::OPT_fno_split_lto_unit)) {
+    if (splitLTOArg->getOption().matches(options::OPT_fsplit_lto_unit)) {
+      CmdArgs.push_back("-fsplit-lto-unit");
+    }
+  }
----------------
shivaramaarao wrote:

incorporated the changes

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


More information about the flang-commits mailing list