From 3c3c7d8911f561ae890bb9436555235afd1531d6 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 12 Feb 2015 20:33:40 +0000 Subject: [PATCH] PECOFF: Don't parse files in .drectve asynchronously. Looks like there's a race condition around here that caused LLD to crash on Windows. Currently we are parsing libraries specified by .drectve section asynchronously, and something is wrong in that process. Disable the feature for now to make buildbots happy. llvm-svn: 228955 --- lld/lib/Driver/WinLinkDriver.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp index b29d235..de6b926 100644 --- a/lld/lib/Driver/WinLinkDriver.cpp +++ b/lld/lib/Driver/WinLinkDriver.cpp @@ -1348,10 +1348,8 @@ bool WinLinkDriver::parse(int argc, const char *argv[], // Add the input files to the linking context. for (std::unique_ptr &file : files) { - if (isReadingDirectiveSection) { - File *f = file.get(); - ctx.getTaskGroup().spawn([f] { f->parse(); }); - } + if (isReadingDirectiveSection) + file.get()->parse(); ctx.getNodes().push_back(llvm::make_unique(std::move(file))); } @@ -1364,10 +1362,8 @@ bool WinLinkDriver::parse(int argc, const char *argv[], // Add the library files to the library group. for (std::unique_ptr &file : libraries) { if (!hasLibrary(ctx, file.get())) { - if (isReadingDirectiveSection) { - File *f = file.get(); - ctx.getTaskGroup().spawn([f] { f->parse(); }); - } + if (isReadingDirectiveSection) + file.get()->parse(); ctx.addLibraryFile(llvm::make_unique(std::move(file))); } } -- 2.7.4