codegen: LLVM 21 ThreadSafeContext and EHFrame compatibility#61273
codegen: LLVM 21 ThreadSafeContext and EHFrame compatibility#61273oscardssmith merged 2 commits intomasterfrom
Conversation
8f8c746 to
a445648
Compare
|
Analyzegc is unhappy: https://buildkite.com/julialang/julia-master/builds/55503#019cd3d0-ac7c-40b7-99ec-70394e193ab7/L2196 |
a445648 to
c0284d5
Compare
|
It's awkward that |
e0d3627 to
86b0ff5
Compare
LLVM 21 removes `jitlink::EHFrameRegistrar` and changes the `EHFrameRegistrationPlugin` constructor to use a factory method. Use the new EHFrameRegistrationPlugin constructor to pass our register/deregister actions. Supersedes #60358. Co-Authored-By: yuyichao <yyc1992@gmail.com> Co-Authored-By: Sam Schweigel <sam.schweigel@juliahub.com>
86b0ff5 to
52bc353
Compare
|
I deleted |
|
All green. Is this ready? |
|
I think so thanks @xal-0 for pushing it forward |
|
Accidentally squashed. Sorry. Can we make it so that the |
Summary
withContextDocompatibility shim forThreadSafeContextAPI changes in LLVM 21 (which removesgetLock(),Lock, andgetContext()in favor of callback-basedwithContextDo)withContextDocallbacks acrossjitlayers.h,jitlayers.cpp,aotcompile.cpp, anddisasm.cppJLEHFrameRegistrationPluginfor LLVM 21+ (which removesjitlink::EHFrameRegistrar), using JITLink allocation actions for EH frame registrationget_context()/get_module()are only called insidewithContextDoscopeaddOutput()/R->replace()which can trigger materializationSupersedes #59946 and #60358, forward-porting those changes to current master.
Test plan
This pull request was written with the assistance of generative AI (Claude).
🤖 Generated with Claude Code
There is quite a few whitespace changes so ignoring it is quite helpful