[llvm] OrcV2: also set COFF flag overrides when custom linking layer is used (PR #129533)
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 04:50:56 PDT 2026
lhames wrote:
> RuntimeDyld remains the default for COFF on Windows.
Yes. I think you'll need to manually specify the ObjectLinkingLayer for now (via the C APIs you found), but I'll look at flipping the default next week.
> RuntimeDyld seems broken when adding relocatable objects through LLJIT. The Mitsuba/Dr.Jit codebase ran into issues where RIP-relative loads from the constant pool exceed the distance of what can be expressed in the used instruction encoding (IMAGE_REL_AMD64_REL32). This is guarded with an assertion in LLVM debug builds but not release ones, and the result is undefined behavior (Very confusing program misbehavior in this case.)
We've been talking about switching to slab-based allocation, which should fix this. Out of interest, do you know how much JIT'd code you usually load?
> Would it be possible to expose JITLink via the C API so that Windows user can opt in?
I think that we can expose enough for the callback above, if that's the right shape? (The full API is big, and still a moving target -- it'll be a while before JITLink has a fully featured C API)
https://github.com/llvm/llvm-project/pull/129533
More information about the llvm-commits
mailing list