Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}")
set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support")

set(ARROW_LLVM_VERSIONS
"21.1"
"20.1"
"19.1"
"18.1"
Expand Down
6 changes: 6 additions & 0 deletions cpp/src/gandiva/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,16 @@ Status UseJITLinkIfEnabled(llvm::orc::LLJITBuilder& jit_builder) {
static auto maybe_use_jit_link = ::arrow::internal::GetEnvVar("GANDIVA_USE_JIT_LINK");
if (maybe_use_jit_link.ok()) {
ARROW_ASSIGN_OR_RAISE(static auto memory_manager, CreateMemmoryManager());
# if LLVM_VERSION_MAJOR >= 21
jit_builder.setObjectLinkingLayerCreator([&](llvm::orc::ExecutionSession& ES) {
return std::make_unique<llvm::orc::ObjectLinkingLayer>(ES, *memory_manager);
});
# else
jit_builder.setObjectLinkingLayerCreator(
[&](llvm::orc::ExecutionSession& ES, const llvm::Triple& TT) {
return std::make_unique<llvm::orc::ObjectLinkingLayer>(ES, *memory_manager);
});
# endif
}
return Status::OK();
}
Expand Down
4 changes: 4 additions & 0 deletions cpp/src/gandiva/llvm_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class GANDIVA_EXPORT LLVMTypes {
llvm::Type* double_type() { return llvm::Type::getDoubleTy(context_); }

llvm::PointerType* ptr_type(llvm::Type* type) {
#if LLVM_VERSION_MAJOR >= 21
return llvm::PointerType::get(context_, 0);
#else
return llvm::PointerType::get(type, 0);
#endif
}

llvm::PointerType* i8_ptr_type() { return ptr_type(i8_type()); }
Expand Down
Loading