mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
jit: Adjust AArch64-only code for LLVM 21.
LLVM 21 changed the arguments of RTDyldObjectLinkingLayer's constructor, breaking compilation with the backported SectionMemoryManager from commit9044fc1d.cd585864c0Backpatch-through: 14 Author: Holger Hoffstätte <holger@applied-asynchrony.com> Reviewed-by: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> Discussion: https://postgr.es/m/d25e6e4a-d1b4-84d3-2f8a-6c45b975f53d%40applied-asynchrony.com
This commit is contained in:
@@ -53,7 +53,14 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(llvm::orc::ObjectLayer, LLVMOrcObjectLayerRef
|
|||||||
LLVMOrcObjectLayerRef
|
LLVMOrcObjectLayerRef
|
||||||
LLVMOrcCreateRTDyldObjectLinkingLayerWithSafeSectionMemoryManager(LLVMOrcExecutionSessionRef ES)
|
LLVMOrcCreateRTDyldObjectLinkingLayerWithSafeSectionMemoryManager(LLVMOrcExecutionSessionRef ES)
|
||||||
{
|
{
|
||||||
|
#if LLVM_VERSION_MAJOR >= 21
|
||||||
|
return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
|
||||||
|
*unwrap(ES), [](const llvm::MemoryBuffer&) {
|
||||||
|
return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true);
|
||||||
|
}));
|
||||||
|
#else
|
||||||
return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
|
return wrap(new llvm::orc::RTDyldObjectLinkingLayer(
|
||||||
*unwrap(ES), [] { return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true); }));
|
*unwrap(ES), [] { return std::make_unique<llvm::backport::SectionMemoryManager>(nullptr, true); }));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user