authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-16 03:56:46-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-16 03:56:46-04:00
logc8b60538ede014e9e924bf218a611bc60ea39b11
tree6fa8969a2953e992aa4fcda0b360e2e3e8e54b56
parent0a280b6062c0b0a3c7a460499c72be40acfcac46
signature Commit is signed but in an unrecognized format.

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.

1 files changed, 6 insertions(+), 6 deletions(-)

deps/lld/wasm/OutputSections.cpp+6-6
...@@ -111,8 +111,8 @@ void CodeSection::writeTo(uint8_t *Buf) {...@@ -111,8 +111,8 @@ void CodeSection::writeTo(uint8_t *Buf) {
111 memcpy(Buf, CodeSectionHeader.data(), CodeSectionHeader.size());111 memcpy(Buf, CodeSectionHeader.data(), CodeSectionHeader.size());
112112
113 // Write code section bodies113 // Write code section bodies
114 parallelForEach(Functions,114 for (const InputChunk *Chunk : Functions)
115 [&](const InputChunk *Chunk) { Chunk->writeTo(Buf); });115 Chunk->writeTo(Buf);
116}116}
117117
118uint32_t CodeSection::numRelocations() const {118uint32_t CodeSection::numRelocations() const {
...@@ -176,7 +176,7 @@ void DataSection::writeTo(uint8_t *Buf) {...@@ -176,7 +176,7 @@ void DataSection::writeTo(uint8_t *Buf) {
176 // Write data section headers176 // Write data section headers
177 memcpy(Buf, DataSectionHeader.data(), DataSectionHeader.size());177 memcpy(Buf, DataSectionHeader.data(), DataSectionHeader.size());
178178
179 parallelForEach(Segments, [&](const OutputSegment *Segment) {179 for (const OutputSegment *Segment : Segments) {
180 // Write data segment header180 // Write data segment header
181 uint8_t *SegStart = Buf + Segment->SectionOffset;181 uint8_t *SegStart = Buf + Segment->SectionOffset;
182 memcpy(SegStart, Segment->Header.data(), Segment->Header.size());182 memcpy(SegStart, Segment->Header.data(), Segment->Header.size());
...@@ -184,7 +184,7 @@ void DataSection::writeTo(uint8_t *Buf) {...@@ -184,7 +184,7 @@ void DataSection::writeTo(uint8_t *Buf) {
184 // Write segment data payload184 // Write segment data payload
185 for (const InputChunk *Chunk : Segment->InputSegments)185 for (const InputChunk *Chunk : Segment->InputSegments)
186 Chunk->writeTo(Buf);186 Chunk->writeTo(Buf);
187 });187 }
188}188}
189189
190uint32_t DataSection::numRelocations() const {190uint32_t DataSection::numRelocations() const {
...@@ -232,8 +232,8 @@ void CustomSection::writeTo(uint8_t *Buf) {...@@ -232,8 +232,8 @@ void CustomSection::writeTo(uint8_t *Buf) {
232 Buf += NameData.size();232 Buf += NameData.size();
233233
234 // Write custom sections payload234 // Write custom sections payload
235 parallelForEach(InputSections,235 for (const InputSection *Section : InputSections)
236 [&](const InputSection *Section) { Section->writeTo(Buf); });236 Section->writeTo(Buf);
237}237}
238238
239uint32_t CustomSection::numRelocations() const {239uint32_t CustomSection::numRelocations() const {