llvm/llvm-project
orc-rt
orc-rt/ is the runtime support library for ORC ("On-Request Compilation"), LLVM's modern JIT framework. The compile-time side of ORC lives in llvm/lib/ExecutionEngine/Orc/; orc-rt is the runtime side: code that ships with a JIT-using application and provides the helpers ORC needs at runtime.
Purpose
The legacy MCJIT and ORCv1 worked by compiling code in-process and providing thin runtime support. ORCv2 split the responsibilities more carefully: the compiler-side libraries handle module compilation and symbol resolution; the runtime-side library provides things like the platform-specific bootstrap, exception-handling registration of JIT'd code, atexit-style finalization, and the dlopen-like APIs JIT clients use to manage materialization units.
Directory layout
orc-rt/
├── include/ # Public headers
├── lib/ # Implementation
├── unittests/
├── test/
├── docs/
├── cmake/
└── ...The subproject is small (~7,000 source lines at this snapshot). It was carved out of compiler-rt's lib/orc/ and elevated to a top-level subproject as the ORC runtime story matured.
What it provides
- EH frame registration / deregistration for JIT'd code so the unwinder can find DWARF CFI for compiled-on-the-fly functions.
atexit-style finalizers that fire when materializations are torn down.- Per-platform bootstrap — small platform-specific routines used to initialize the JIT linker's view of the host process.
- Generic helpers that ORC's
Platformplugins call into.
The exact public API is still settling — orc-rt is the youngest top-level subproject in the repository.
Integration points
- LLVM core (
llvm) —llvm::orc::LLJIT,llvm::orc::ExecutionSession, thePlatforminterface inllvm/include/llvm/ExecutionEngine/Orc/are the consumers. - libunwind (
libunwind) — JIT'd code needs to register its.eh_frameso unwinding works through it. - Compiler-rt (
compiler-rt) — the olderlib/orc/implementation lives there for compatibility.
Entry points for modification
- Adding a runtime helper: implementation in
orc-rt/lib/, header inorc-rt/include/, and a public API contract on the LLVM side underllvm/include/llvm/ExecutionEngine/Orc/. - Platform plumbing: per-OS shims live alongside the generic implementation; see how the existing platforms split out.
Reference
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.
Previous
libclc
Next
llvm-libgcc