[all-commits] [llvm/llvm-project] 2222cf: [C-API] LLVMOrcCreateObjectLinkingLayerWithInProce...
Thomas Munro via All-commits
all-commits at lists.llvm.org
Wed Dec 3 19:22:28 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2222cfe7e11ff3e0434bc696856629199ef0da7c
https://github.com/llvm/llvm-project/commit/2222cfe7e11ff3e0434bc696856629199ef0da7c
Author: Thomas Munro <thomas.munro at gmail.com>
Date: 2025-12-04 (Thu, 04 Dec 2025)
Changed paths:
M llvm/include/llvm-c/OrcEE.h
M llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
Log Message:
-----------
[C-API] LLVMOrcCreateObjectLinkingLayerWithInProcessMemoryManager (#169862)
Allow C programs to use JITLink with trivial new C-API wrapper. Modeled
on `LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager`
except that it has to deal with failure of
`jitlink::InProcessMemoryManager::Create()`. Function name suggested by
@lhames in https://github.com/llvm/llvm-project/issues/106203.
I suppose failure of underlying platform-specific things like
`sysconf(_SC_PAGESIZE)` shouldn't really happen. An alternative error
reporting style might be to follow
`LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess` and return
`LLVMErrorRef` with an output parameter for the `LLVMOrcObjectLayerRef`,
but then it wouldn't be a drop-in replacement for
`LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager`.
Thoughts?
This is wanted by PostgreSQL (branch using this API:
https://github.com/macdice/postgres/tree/llvm-22-proposed-c-api). (We're
also using `LLVMCreatePerfJITEventListener`,
`LLVMCreatePerfJITEventListener`,
`LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener`, so it looks
like we'll need to research `PerfSupportPlugin`,
`DebuggerSupportPlugin`, `ObjectLinkingLayer::addPlugin()`...)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list