diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-01-08 23:12:42 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-01-08 23:12:42 +0000 |
| commit | 0657e5c3f24b79c5441bb4c97ca9023e8f1091c0 (patch) | |
| tree | 63218ba5015324ea1bf2723a864a08704ef84065 /lld/ELF/Writer.cpp | |
| parent | dc0ba5daff6cd97f745570acb7b6fe30f633f28b (diff) | |
| download | bcm5719-llvm-0657e5c3f24b79c5441bb4c97ca9023e8f1091c0.tar.gz bcm5719-llvm-0657e5c3f24b79c5441bb4c97ca9023e8f1091c0.zip | |
Do not use parallelForEach to call maybeCompress().
Currently LLVM's paralellForEach has a problem with reentracy.
That caused https://bugs.llvm.org/show_bug.cgi?id=35788 (lld somtimes
hangs while linking Ruby 2.4) because maybeCompress calls writeTo which
uses paralellForEach.
This patch is to avoid using paralellForEach to call maybeCompress
to workaround the issue.
llvm-svn: 322041
Diffstat (limited to 'lld/ELF/Writer.cpp')
| -rw-r--r-- | lld/ELF/Writer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 1f5c038537a..5feff456ffa 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -432,8 +432,8 @@ template <class ELFT> void Writer<ELFT>::run() { // If -compressed-debug-sections is specified, we need to compress // .debug_* sections. Do it right now because it changes the size of // output sections. - parallelForEach(OutputSections, - [](OutputSection *Sec) { Sec->maybeCompress<ELFT>(); }); + for (OutputSection *Sec : OutputSections) + Sec->maybeCompress<ELFT>(); Script->allocateHeaders(Phdrs); |

