forked from OSchip/llvm-project
Revert "PECOFF: Don't parse files in .drectve asynchronously."
This reverts commit r228955. Previously files appear in a .drectve section are parsed synchronously to avoid threading issues. I believe it's now safe to do that asynchronously. llvm-svn: 230905
This commit is contained in:
parent
21fa09890c
commit
990bb16036
|
@ -1341,8 +1341,10 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
|
|||
|
||||
// Add the input files to the linking context.
|
||||
for (std::unique_ptr<File> &file : files) {
|
||||
if (isReadingDirectiveSection)
|
||||
file.get()->parse();
|
||||
if (isReadingDirectiveSection) {
|
||||
File *f = file.get();
|
||||
ctx.getTaskGroup().spawn([f] { f->parse(); });
|
||||
}
|
||||
ctx.getNodes().push_back(llvm::make_unique<FileNode>(std::move(file)));
|
||||
}
|
||||
|
||||
|
@ -1355,8 +1357,10 @@ bool WinLinkDriver::parse(int argc, const char *argv[],
|
|||
// Add the library files to the library group.
|
||||
for (std::unique_ptr<File> &file : libraries) {
|
||||
if (!hasLibrary(ctx, file.get())) {
|
||||
if (isReadingDirectiveSection)
|
||||
file.get()->parse();
|
||||
if (isReadingDirectiveSection) {
|
||||
File *f = file.get();
|
||||
ctx.getTaskGroup().spawn([f] { f->parse(); });
|
||||
}
|
||||
ctx.addLibraryFile(llvm::make_unique<FileNode>(std::move(file)));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue