uwsampa / accept

an approximate compiler
http://accept.rocks
MIT License
37 stars 14 forks source link

make setup accept with llvm 3.9 #50

Open tariqazmy opened 6 years ago

tariqazmy commented 6 years ago

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

sampsyo commented 6 years ago

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.

alexander-cathis commented 6 years ago

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

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.