Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make setup accept with llvm 3.9 #50

Open
tariqazmy opened this issue Apr 29, 2018 · 2 comments
Open

make setup accept with llvm 3.9 #50

tariqazmy opened this issue Apr 29, 2018 · 2 comments

Comments

@tariqazmy
Copy link

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
Copy link
Member

sampsyo commented Apr 29, 2018

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants