llvm-project/lld/Common
Andrew Ng 564481aebe [Support] ThreadPoolExecutor fixes for Windows/MinGW
Changed ThreadPoolExecutor to no longer use detached threads and instead
to join threads on destruction. This is to prevent intermittent crashing
on Windows when doing a normal full exit, e.g. via exit().

Changed ThreadPoolExecutor to be a ManagedStatic so that it can be
stopped on llvm_shutdown(). Without this, it would only be stopped in
the destructor when doing a full exit. This is required to avoid
intermittent crashing on Windows due to a race condition between the
ThreadPoolExecutor starting up threads and the process doing a fast
exit, e.g. via _exit().

The Windows crashes appear to only occur with the MSVC static runtimes
and are more frequent with the debug static runtime.

These changes also prevent intermittent deadlocks on exit with the MinGW
runtime.

Differential Revision: https://reviews.llvm.org/D70447
2020-01-10 12:44:01 +00:00
..
Args.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
CMakeLists.txt [LLD] Move duplicated dwarf parsing code to the Common library. NFC. 2019-10-21 08:01:52 +00:00
DWARF.cpp [LLD] Move duplicated dwarf parsing code to the Common library. NFC. 2019-10-21 08:01:52 +00:00
ErrorHandler.cpp [Support] ThreadPoolExecutor fixes for Windows/MinGW 2020-01-10 12:44:01 +00:00
Filesystem.cpp [lld] Fix trivial typos in comments 2020-01-06 10:25:48 -08:00
Memory.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Reproduce.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Strings.cpp [LLD] Simplify the demangleItanium function. NFC. 2019-09-27 12:24:18 +00:00
TargetOptionsCommandFlags.cpp [ELF] Support explicitly overriding relocation model in LTO 2019-07-20 21:59:47 +00:00
Threads.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Timer.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Version.cpp Update `ld.lld --version` string for monorepo. 2019-02-21 18:37:26 +00:00