[clang] [flang] [lld] [llvm] [mlir] [Passes] Make PipelineTuningOptions not read library options (PR #238434)

Ben Dunbobbin via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 5 08:47:16 PST 2026


================
@@ -226,7 +226,10 @@ void lto::DTLTO::buildCommonRemoteCompilerOptions() {
     Ops.push_back("-ffunction-sections");
   if (C.Options.DataSections)
     Ops.push_back("-fdata-sections");
-  if (C.PTO.LoopInterchange)
+  // Match what an in-process backend resolves from C.LibraryOptions.
+  cl::LibraryOptionsContext NoLibraryOptions;
+  if (*C.PTO.resolve(C.LibraryOptions ? *C.LibraryOptions : NoLibraryOptions)
+           .LoopInterchange)
----------------
bd1976bris wrote:

Thanks for updating this. I'm leaving a breadcrumb here for anyone interested in the long term plan for this code: https://discourse.llvm.org/t/synchronizing-lto-code-generation-configuration-between-clang-and-lld-dtlto.

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


More information about the cfe-commits mailing list