Commit 95f45cfc34

Andrew Kelley <superjoe30@gmail.com>
2018-07-25 08:36:29
patch LLD to fix COFF crashing when linking twice in same process
closes #1289
1 parent 02713e8
Changed files (1)
deps
lld
deps/lld/COFF/Driver.cpp
@@ -72,6 +72,9 @@ bool link(ArrayRef<const char *> Args, bool CanExitEarly, raw_ostream &Diag) {
     exitLld(errorCount() ? 1 : 0);
 
   freeArena();
+  ObjFile::Instances.clear();
+  ImportFile::Instances.clear();
+  BitcodeFile::Instances.clear();
   return !errorCount();
 }