raulcd commented on code in PR #51258:
URL: https://github.com/apache/arrow/pull/51258#discussion_r3967699734


##########
cpp/src/gandiva/engine.cc:
##########
@@ -207,7 +207,12 @@ 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
+#  if LLVM_VERSION_MAJOR >= 23
+    jit_builder.setObjectLinkingLayerCreator(
+        [&](llvm::orc::ExecutionSession& ES, 
llvm::jitlink::JITLinkMemoryManager&) {

Review Comment:
   I am not an expert here but should we use a 
`llvm::jitlink::JITLinkMemoryManager& memory_manager` here?
   ```diff
   -#  if LLVM_VERSION_MAJOR >= 21
   +#  if LLVM_VERSION_MAJOR >= 23
   +    jit_builder.setObjectLinkingLayerCreator(
   +        [](llvm::orc::ExecutionSession& ES,
   +           llvm::jitlink::JITLinkMemoryManager& memory_manager) {
   +          return std::make_unique<llvm::orc::ObjectLinkingLayer>(ES, 
memory_manager);
   +        });
   +#  elif LLVM_VERSION_MAJOR >= 21
   ```
   @dmitry-chirkov-dremio @lriggs @akravchukdremio @xxlaykxx @kou 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to