[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
Thu Jun 11 09:22:05 PDT 2026


================
@@ -1065,6 +1065,12 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) {
       llvmModule->addModuleFlag(llvm::Module::Error, "ThinLTO", uint32_t(0));
     }
 
+    if (opts.PrepareForFullLTO && opts.EnableSplitLTOUnit && emitSummary &&
+        !llvmModule->getModuleFlag("EnableSplitLTOUnit")) {
+      llvmModule->addModuleFlag(llvm::Module::Error, "EnableSplitLTOUnit",
+                                uint32_t(1));
+    }
+
----------------
shivaramaarao wrote:

corrected the condition.

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


More information about the flang-commits mailing list