aboutsummaryrefslogtreecommitdiff
path: root/deps/lld/wasm/OutputSections.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-04-16 03:56:46 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-04-16 03:56:46 -0400
commitc8b60538ede014e9e924bf218a611bc60ea39b11 (patch)
tree6fa8969a2953e992aa4fcda0b360e2e3e8e54b56 /deps/lld/wasm/OutputSections.cpp
parent0a280b6062c0b0a3c7a460499c72be40acfcac46 (diff)
downloadzig-c8b60538ede014e9e924bf218a611bc60ea39b11.tar.gz
zig-c8b60538ede014e9e924bf218a611bc60ea39b11.zip
add patch to LLD to fix deadlock race condition in wasm linker
Patch is getting upstreamed here: https://reviews.llvm.org/D60757 And so this patch can be removed with LLVM 9.0.0.
Diffstat (limited to 'deps/lld/wasm/OutputSections.cpp')
-rw-r--r--deps/lld/wasm/OutputSections.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/deps/lld/wasm/OutputSections.cpp b/deps/lld/wasm/OutputSections.cpp
index 4123d63b74..6b7b18d4ca 100644
--- a/deps/lld/wasm/OutputSections.cpp
+++ b/deps/lld/wasm/OutputSections.cpp
@@ -111,8 +111,8 @@ void CodeSection::writeTo(uint8_t *Buf) {
memcpy(Buf, CodeSectionHeader.data(), CodeSectionHeader.size());
// Write code section bodies
- parallelForEach(Functions,
- [&](const InputChunk *Chunk) { Chunk->writeTo(Buf); });
+ for (const InputChunk *Chunk : Functions)
+ Chunk->writeTo(Buf);
}
uint32_t CodeSection::numRelocations() const {
@@ -176,7 +176,7 @@ void DataSection::writeTo(uint8_t *Buf) {
// Write data section headers
memcpy(Buf, DataSectionHeader.data(), DataSectionHeader.size());
- parallelForEach(Segments, [&](const OutputSegment *Segment) {
+ for (const OutputSegment *Segment : Segments) {
// Write data segment header
uint8_t *SegStart = Buf + Segment->SectionOffset;
memcpy(SegStart, Segment->Header.data(), Segment->Header.size());
@@ -184,7 +184,7 @@ void DataSection::writeTo(uint8_t *Buf) {
// Write segment data payload
for (const InputChunk *Chunk : Segment->InputSegments)
Chunk->writeTo(Buf);
- });
+ }
}
uint32_t DataSection::numRelocations() const {
@@ -232,8 +232,8 @@ void CustomSection::writeTo(uint8_t *Buf) {
Buf += NameData.size();
// Write custom sections payload
- parallelForEach(InputSections,
- [&](const InputSection *Section) { Section->writeTo(Buf); });
+ for (const InputSection *Section : InputSections)
+ Section->writeTo(Buf);
}
uint32_t CustomSection::numRelocations() const {