summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2018-01-08 23:12:42 +0000
committerRui Ueyama <ruiu@google.com>2018-01-08 23:12:42 +0000
commit0657e5c3f24b79c5441bb4c97ca9023e8f1091c0 (patch)
tree63218ba5015324ea1bf2723a864a08704ef84065 /lld/ELF/Writer.cpp
parentdc0ba5daff6cd97f745570acb7b6fe30f633f28b (diff)
downloadbcm5719-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.cpp4
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);
OpenPOWER on IntegriCloud