[PATCH] D90663: [lld-macho] Add very basic support for LTO

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 21:26:29 PST 2020


int3 added inline comments.


================
Comment at: lld/MachO/LTO.cpp:73
+    for (unsigned i = 1; i != maxTasks; ++i)
+      saveBuffer(buf[i], config->outputFile + Twine(i) + ".lto.o");
+  }
----------------
MaskRay wrote:
> int3 wrote:
> > MaskRay wrote:
> > > This needs a test file with more than one input file.
> > I actually did try doing that (with 2 files), but it appears that the `ltoObj` compiled both of them in the same thread. Any idea how to get it to deterministically use more than 1?
> Ah, partitions is a ThinLTO concept. You'll need `opt -module-summary a.ll -o a.o` instead of llvm-as
Thanks for the pointer! I've added the test, let me know if it looks right


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90663/new/

https://reviews.llvm.org/D90663



More information about the llvm-commits mailing list