ΒΆllvm::lto::ThinBackend
createWriteIndexesThinBackend(
    std::string OldPrefix,
    std::string NewPrefix,
    bool ShouldEmitImportsFiles,
    llvm::raw_fd_ostream* LinkedObjectsFile,
    llvm::lto::IndexWriteCallback OnWrite)

Description

This ThinBackend writes individual module indexes to files, instead of running the individual backend jobs. This backend is for distributed builds where separate processes will invoke the real backends. To find the path to write the index to, the backend checks if the path has a prefix of OldPrefix; if so, it replaces that prefix with NewPrefix. It then appends ".thinlto.bc" and writes the index to that path. If ShouldEmitImportsFiles is true it also writes a list of imported files to a similar path with ".imports" appended instead. LinkedObjectsFile is an output stream to write the list of object files for the final ThinLTO linking. Can be nullptr. OnWrite is callback which receives module identifier and notifies LTO user that index file for the module (and optionally imports file) was created.

Declared at: llvm/include/llvm/LTO/LTO.h:225

Parameters

std::string OldPrefix
std::string NewPrefix
bool ShouldEmitImportsFiles
llvm::raw_fd_ostream* LinkedObjectsFile
llvm::lto::IndexWriteCallback OnWrite