Skip to content

[BUILD] Upgrade ORC JIT to LLVM 23.1.1 - #810

Open
cyx-6 wants to merge 1 commit into
apache:mainfrom
cyx-6:codex/orcjit-llvm-23
Open

cyx-6 wants to merge 1 commit into
apache:mainfrom
cyx-6:codex/orcjit-llvm-23

Conversation

@cyx-6

@cyx-6 cyx-6 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Builds on the ORCJIT loading and lifecycle hardening merged in #809.

Why

Upgrade the ORC JIT addon from LLVM 22.1.0 to LLVM 23.1.1 and use the upstream fixes to reduce local compatibility code.

The implementation was derived from a direct comparison of llvmorg-22.1.0 and llvmorg-23.1.1:

  • LLJIT now owns its JITLinkMemoryManager; the object-layer creator receives that manager by reference.
  • dynamic-library generators now use LLJIT's DylibManager.
  • LLVM 23 ELFNixPlatform registers and runs ELF fini sections, so Linux can use LLJIT::initialize / deinitialize instead of the local init/fini plugin.
  • LLVM 23 fixes the x86-64 GOTPCRELX relaxation to use signed PC-relative reachability and BranchPCRel32, so the local GOTPCRELXFixPlugin is deleted.

The source comparison also showed that GenericLLVMIRPlatform was already LLJIT's default in LLVM 22.1.0. This PR therefore preserves generic platform support on macOS and Windows, including unwind registration, rather than treating it as an LLVM 23 behavior change.

Changes

  • pin builds and CI to LLVM 23.1.1;
  • adapt the LLJIT memory-manager, object-layer, and dylib-generator APIs;
  • move Linux lifecycle handling to LLVM 23 ELFNixPlatform;
  • keep batched slab deallocation in reverse allocation order, matching LLVM's in-process manager;
  • remove the upstreamed GOTPCRELX workaround;
  • retain the existing Mach-O and COFF lifecycle adapters only where native platforms are not yet usable.

Validation

  • macOS arm64, LLVM 23.1.1: 136 passed, 54 skipped.
  • repository pre-commit suite: all hooks passed.
  • Linux x86-64, Linux aarch64, Windows, and clean wheel validation are delegated to CI.

@cyx-6
cyx-6 force-pushed the codex/orcjit-llvm-23 branch 2 times, most recently from 027a4a2 to 315e11a Compare September 22, 2026 11:37
Adopt LLJIT's LLVM 23 memory-manager and dynamic-library APIs. Use the new ELFNixPlatform fini support on Linux, preserve reverse teardown order in the slab manager, and remove the GOTPCRELX workaround now fixed upstream.
@cyx-6
cyx-6 force-pushed the codex/orcjit-llvm-23 branch from 315e11a to 5d77e52 Compare September 22, 2026 12:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant