[PATCH] D119049: [LLD] Allow usage of LLD as a library

Steven Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 09:50:57 PDT 2023


srj added a comment.

Hi, I'm trying to update Halide's usage of this API to work properly, there are a few things that aren't clear to me:

- It appears that `lldMain` is now the preferred entry points; I presume that `unsafeLldMain` and `safeLldMain` are intended for internal use only?
- It's not clear to me whether use of `CrashRecoveryContext` with this API is required or optional. (We previously didn't use it, though we did wrap calls to the old entry point with `std::signal()` usage to save and restore signal handlers.)
- It's not clear to me whether we should use `exitLld()` or not -- in the event of failure, we always previously exited anyway, but it appears that `exitLld()` always exits with SIGABRT, which would break the existing contract of our tool (which would exit via `exit(1)`). Does `exitLld()` do special cleanup (eg, temp file cleanup) that would be missed otherwise?

  Thanks in advance for any guidance you can give here!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119049



More information about the llvm-commits mailing list