[PATCH] D46598: Add support for LTO plugin option obj-path

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 13:41:46 PDT 2018


pcc added inline comments.


================
Comment at: lld/ELF/LTO.cpp:282
     if (Config->SaveTemps)
       saveBuffer(Buff[0], Config->OutputFile + ".lto.o");
----------------
You don't need this part any more. With `thinlto-index-only`, the `obj-path` file is not a "temporary" file but rather one of the final outputs.


================
Comment at: lld/ELF/LTO.cpp:302-307
+    if (!Config->LTOObjPath.empty()) {
+      if (I == 0)
+        saveBuffer(Buff[I], Config->LTOObjPath);
+      else
+        saveBuffer(Buff[I], std::string(Config->LTOObjPath) + utostr(I));
+    }
----------------
I'd drop this part. We only need to support `obj-path` with `thinlto-index-only`.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46598





More information about the llvm-commits mailing list