uwsampa/accept

make setup accept with llvm 3.9

Opened this issue · 2 comments

I edit the makefile and change the llvm 3.2 source to llvm 3.9.0, but I got this error after make setup process:

-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
CMake Error at tools/clang/CMakeLists.txt:150 (include):
include could not find load file:

LLVMParseArguments

CMake Error at tools/clang/CMakeLists.txt:165 (parse_arguments):
Unknown CMake command "parse_arguments".
Call Stack (most recent call first):
tools/clang/include/clang/AST/CMakeLists.txt:1 (clang_tablegen)

Any idea on how to overcome this error? I was also wondering if there is any additional steps/modification needed in order to use higher version of llvm?

Thanks

The project is made for LLVM 3.2. If you'd like to use a more recent version, we'd really appreciate your help updating the infrastructure! But there are no specific guidelines other than the usual: see what's changed between the versions and make the appropriate changes.

A poor way I've gotten around that is to let 3.2 build without touching the Makefile. Then manually download and extract a new version of Clang and LLVM, and replace the contents of accept/clang and accept/llvm with said sources.
You may still run into the include() problem later in the build which I got past by adding the below lines to accept/CMakelists.txt before include(AddLLVM) :

  • list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/modules")

  • set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)

  • set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)

  • set(LLVM_PLUGIN_EXT “so”)

However, like @sampsyo said, this tool is made for LLVM 3.2 and there are other modifications to the project you must make to play nice with different versions of Clang and LLVM.