[lld] [ELF] Add context-aware diagnostic functions (PR #112319)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 16:35:45 PDT 2024
https://github.com/aganea commented:
I am curious, what led you to do this?
Two extra notes:
1. I have started doing https://github.com/aganea/llvm-project/tree/my for COFF. This was working for simple stuff, but as soon as we hit ManagedObjects, cl::opts or other global state, more work will be needed (which nevertheless I'd like us to do).
2. As an escape hatch for err/warn/fatal, and to speed things up, I actually made the `CommonLinkerContext` a thread-local, see https://github.com/aganea/llvm-project/blob/d9516dee59fab6675e5d865cc8fbe15af2d6418f/lld/Common/CommonLinkerContext.cpp#L21 and more particulary the 'my' branch above. In any case, even if we made all diagnostic functions context-aware, I think we'd still need a thread-local context when using `Parallel.h` functions; unless we pass the context too, along with the lambda.
@MaskRay If you're going to the LLVM conf. next week, we could have a chat around all this stuff!
https://github.com/llvm/llvm-project/pull/112319
More information about the llvm-commits
mailing list