[PATCH] D46034: Support for distributed ThinLTO options

Rumeet Dhindsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 13:42:03 PDT 2018


rdhindsa added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1018
+      // distributed build system will want to confirm that all expected outputs
+      // are created based on all of the modules provided to the linker.
+      if (Config->ThinLTOIndexOnly)
----------------
pcc wrote:
> This part seems to be equivalent to `writeEmptyDistributedBuildOutputs` in the gold plugin. It's unfortunate that we need this in order to work around a deficiency in the distributed build system, but if we are going to do this, can we instead do something equivalent to that in order to avoid linking more than we need?
> 
> I think we should be able to do this by keeping track of which `LazyObjFile`s have been added to the link, and emitting a `.thinlto.bc` file for every file that has not been added to the link.
I intended to add similar functionality as to writeEmptyDistributedBuildOutputs in the LTO.cpp while trying to add files, so that we emit .thinlto.bc for every file, instead of doing more linking. Will that be okay? 


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46034





More information about the llvm-commits mailing list