[PATCH] D91418: [LLD][ELF] Rename lld elf driver main function

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 10:35:17 PST 2020


aganea added a comment.

In D91418#2394527 <https://reviews.llvm.org/D91418#2394527>, @sbc100 wrote:

> However I was under the impression that it was a non-goal to make the current version of lld usable as a library.   I mean it make very heavy use of globals as well as things like early process exiting doesn't it?  Have the goals changed recently?

If it's just one instance at a time, the COFF driver currently works as a library. If you're talking about multi-threaded instances, there's an old prototype here: D86353 <https://reviews.llvm.org/D86353> (and supporting patches D86351 <https://reviews.llvm.org/D86351> and D86352 <https://reviews.llvm.org/D86352>) - ie. several multi-threaded instances of LLD in the same process, linking different executables, and it is indeed a bit complicated. But we can discuss the incremental steps to get there. One issue is the `CommandLineParser` and more broadly everything related to `cl::opt`s. This has been discussed in the past but without a clear consensus (see http://lists.llvm.org/pipermail/llvm-dev/2018-October/127039.html). Most of the remaining issues were local statics which can be made part of a larger context (either per-thread or per linker instance).

However I think this current patch is orthogonal to all that and simply aims to solve a gdb breakpoint issue?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91418



More information about the llvm-commits mailing list