LLVM out of source pass build: Loadable modules not supported (on Linux)

后端 未结 3 454
长情又很酷
长情又很酷 2021-01-02 18:47

I compiled and installed LLVM from trunk on debian wheezy some weeks ago (configure & make) and now tried to out of source compile the llvm-mutate pass. AFAICC, llvm-mut

3条回答
  •  囚心锁ツ
    2021-01-02 19:13

    AddLLVM cmake module needs some prerequisites. Add to CMakeLists.txt:

    # AddLLVM needs these
    set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
    set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)
    
    include(HandleLLVMOptions) # important: matches compiler flags to LLVM/Clang build
    include(AddLLVM)
    

    Some inspiration came from this message.

提交回复
热议问题