r172749 removed Linker/LinkArchives.cpp and Linker/LinkItems.cpp citing:
This code is dead, and the "right" way to get this support is to use the
platform-specific linker-integrated LTO mechanisms, or the forthcoming LLVM
linker.
Could someone please expand on what the “right way” is and these LTO mechanisms or where I can find further information? We used several functions in LinkItems.cpp to create a single bitcode module prior to processing.
What functions were you using, and what features of them were you using? If you just need to link individual bit codes together, you can do it in exactly the same way that llvm-link does (using Linker::LinkModules).
Thanks for the reply. We use LinkInFile() to pull in input bitcode files that can include archives and link them into a single bitcode module which we operate on. I will look into how llvm-link achieves this. Part of this process includes subclassing llvm::Linker so that we can modify LinkModules to map individual symbols to their source bitcode module.
We do need to be able to pull objects (bitcode only) out of archives so I will look into the gold plugin as well.