From 95f45cfc34cd5e77dad2318cab27194535e14d16 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 25 Jul 2018 02:36:29 -0400 Subject: [PATCH] patch LLD to fix COFF crashing when linking twice in same process closes #1289 --- deps/lld/COFF/Driver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deps/lld/COFF/Driver.cpp b/deps/lld/COFF/Driver.cpp index 0f3d8fb0b4..34b968fe5e 100644 --- a/deps/lld/COFF/Driver.cpp +++ b/deps/lld/COFF/Driver.cpp @@ -72,6 +72,9 @@ bool link(ArrayRef Args, bool CanExitEarly, raw_ostream &Diag) { exitLld(errorCount() ? 1 : 0); freeArena(); + ObjFile::Instances.clear(); + ImportFile::Instances.clear(); + BitcodeFile::Instances.clear(); return !errorCount(); }