[PATCH] D86401: [LLD][COFF] Reset outputSections for successive runs

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 11:31:44 PDT 2020


mstorsjo added a comment.

In D86401#2234225 <https://reviews.llvm.org/D86401#2234225>, @hans wrote:

> Cherry-picked to 11.x as 0c37a9165611880b99b1f9632179864ecb3f2e13 <https://reviews.llvm.org/rG0c37a9165611880b99b1f9632179864ecb3f2e13>.
>
> I'm curious about the background here, though. When would lld::coff::link be called successively? Could we have a test for this?

That'd be when you use lld as a library from a host program, instead of using lld as a standalone executable. lld is tricky in that respect, as it fairly heavily uses global data structures (you can't have two lld linking invocations running in separate threads at the same time), and those structures need some care taken to reset them properly between each run.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86401/new/

https://reviews.llvm.org/D86401



More information about the llvm-commits mailing list