HuaHuaY commented on code in PR #51266:
URL: https://github.com/apache/arrow/pull/51266#discussion_r3969655362


##########
cpp/src/gandiva/engine.cc:
##########
@@ -207,7 +209,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:
   > Is Copilot right here?
   
   No, it's wrong. Copilot is not right because `memory_manager` is static and 
we don't need to capture a static variable.
   
   However, there is another minor issue here: it doesn't utilize the new 
parameters provided by LLVM 23. I have submitted a new commit to address this.



-- 
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