Changeset View
Changeset View
Standalone View
Standalone View
lld/ELF/Driver.cpp
Show First 20 Lines • Show All 2,573 Lines • ▼ Show 20 Lines | const bool skipLinkedOutput = config->thinLTOIndexOnly || config->emitLLVM || | ||||
config->ltoEmitAsm || | config->ltoEmitAsm || | ||||
!config->thinLTOModulesToCompile.empty(); | !config->thinLTOModulesToCompile.empty(); | ||||
// Do link-time optimization if given files are LLVM bitcode files. | // Do link-time optimization if given files are LLVM bitcode files. | ||||
// This compiles bitcode files into real object files. | // This compiles bitcode files into real object files. | ||||
// | // | ||||
// With this the symbol table should be complete. After this, no new names | // With this the symbol table should be complete. After this, no new names | ||||
// except a few linker-synthesized ones will be added to the symbol table. | // except a few linker-synthesized ones will be added to the symbol table. | ||||
const size_t numFilesBeforeLTO = files.size(); | |||||
const size_t numObjsBeforeLTO = objectFiles.size(); | const size_t numObjsBeforeLTO = objectFiles.size(); | ||||
invokeELFT(compileBitcodeFiles, skipLinkedOutput); | invokeELFT(compileBitcodeFiles, skipLinkedOutput); | ||||
// Adding the LTO object file to the link may have added additional input | |||||
// files to the link, e.g. if a builtin libcall was resolved using an object | |||||
// file with deplibs. | |||||
{ | |||||
llvm::TimeTraceScope timeScope("Parse input files"); | |||||
for (size_t i = numFilesBeforeLTO; i < files.size(); ++i) { | |||||
llvm::TimeTraceScope timeScope("Parse input files", files[i]->getName()); | |||||
parseFile(files[i]); | |||||
} | |||||
} | |||||
// Symbol resolution finished. Report backward reference problems, | // Symbol resolution finished. Report backward reference problems, | ||||
// --print-archive-stats=, and --why-extract=. | // --print-archive-stats=, and --why-extract=. | ||||
reportBackrefs(); | reportBackrefs(); | ||||
writeArchiveStats(); | writeArchiveStats(); | ||||
writeWhyExtract(); | writeWhyExtract(); | ||||
if (errorCount()) | if (errorCount()) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |