diff options
Diffstat (limited to 'lld/ELF/Error.cpp')
| -rw-r--r-- | lld/ELF/Error.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index dce57776ebe..f2d40a01306 100644 --- a/lld/ELF/Error.cpp +++ b/lld/ELF/Error.cpp @@ -9,6 +9,7 @@ #include "Error.h" #include "Config.h" +#include "Threads.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/Error.h" @@ -100,6 +101,8 @@ void elf::error(const Twine &Msg) { } void elf::exitLld(int Val) { + waitForBackgroundThreads(); + // Dealloc/destroy ManagedStatic variables before calling // _exit(). In a non-LTO build, this is a nop. In an LTO // build allows us to get the output of -time-passes. |

