aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-01-09 17:38:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-01-09 17:38:43 +0000
commit18a7633888eacb1633c577c11bd53805ced978f5 (patch)
tree6509f8b17dcc560db8df82f94aca23cbb33fad93 /contrib/llvm
parent53743bd4bbd1e61a54a6f261d7650c359548b746 (diff)
downloadsrc-18a7633888eacb1633c577c11bd53805ced978f5.tar.gz
src-18a7633888eacb1633c577c11bd53805ced978f5.zip
Pull in r322041 from upstream lld trunk (by Rui Ueyama):
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. This should fix potential hangs when linking parts of ruby24.
Notes
Notes: svn path=/projects/clang600-import/; revision=327733
Diffstat (limited to 'contrib/llvm')
-rw-r--r--contrib/llvm/tools/lld/ELF/Writer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm/tools/lld/ELF/Writer.cpp b/contrib/llvm/tools/lld/ELF/Writer.cpp
index 1f5c038537a5..5feff456ffa9 100644
--- a/contrib/llvm/tools/lld/ELF/Writer.cpp
+++ b/contrib/llvm/tools/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);