$_ZZ23TestStaticVarInFunctionbE1x = comdat any
@_ZZ23TestStaticVarInFunctionbE1x = linkonce_odr dso_local global i32 123, comdat, align 4
Hi Haoran
Yes, that's expected behavior. Definition generators only get
invoked for symbols that are not defined in your modules. The
documentation in https://llvm.org/docs/ORCv2.html says:
> If a definition generator is attached to a JITDylib,
then any unsuccessful lookup on that JITDylib will fall back to
calling the
definition generator
I guess the situation is hard to compare with the context a static
linker runs in. It's an interesting idea though. Maybe it's
possible achieve with a JITLink plugin?
Best
Stefan
_______________________________________________ LLVM Developers mailing list llvm...@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-- https://flowcrypt.com/pub/stefan....@gmail.com