kou commented on issue #37834:
URL: https://github.com/apache/arrow/issues/37834#issuecomment-1732419801

   I tried this a bit:
   
   ```diff
   diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
   index f2906b960..f0acab038 100644
   --- a/cpp/CMakeLists.txt
   +++ b/cpp/CMakeLists.txt
   @@ -152,6 +152,7 @@ set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}")
    set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support")
    
    set(ARROW_LLVM_VERSIONS
   +    "17.0"
        "16.0"
        "15.0"
        "14.0"
   diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt
   index db260b5ac..d2810c39f 100644
   --- a/cpp/src/gandiva/CMakeLists.txt
   +++ b/cpp/src/gandiva/CMakeLists.txt
   @@ -31,8 +31,6 @@ if(ARROW_WITH_ZSTD AND "${zstd_SOURCE}" STREQUAL "SYSTEM")
      provide_find_module(zstdAlt "Gandiva")
    endif()
    
   -add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR})
   -
    # Set the path where the bitcode file generated, see 
precompiled/CMakeLists.txt
    set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc")
    set(GANDIVA_PRECOMPILED_CC_PATH 
"${CMAKE_CURRENT_BINARY_DIR}/precompiled_bitcode.cc")
   diff --git a/cpp/src/gandiva/engine.cc b/cpp/src/gandiva/engine.cc
   index 7d75793a3..511f7cc11 100644
   --- a/cpp/src/gandiva/engine.cc
   +++ b/cpp/src/gandiva/engine.cc
   @@ -53,7 +53,11 @@
    #include <llvm/IR/LegacyPassManager.h>
    #include <llvm/IR/Verifier.h>
    #include <llvm/Linker/Linker.h>
   +#if LLVM_VERSION_MAJOR >= 17
   +#include <llvm/TargetParser/SubtargetFeature.h>
   +#else
    #include <llvm/MC/SubtargetFeature.h>
   +#endif
    #include <llvm/Support/DynamicLibrary.h>
    #include <llvm/Support/Host.h>
    #if LLVM_VERSION_MAJOR >= 14
   ```
   
   But it seems that we need to migrate our code to the new pass manager: 
https://llvm.org/docs/NewPassManager.html
   Because the legacy pass manager was removed in LLVM 17.0.1: 
https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html#changes-to-llvm-infrastructure
   
   @js8544 @niyue Are you interested in working on 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