-
Notifications
You must be signed in to change notification settings - Fork 156
Allow LLVM beeing installed in a custom path #690
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
Allow LLVM beeing installed in a custom path #690
Conversation
|
Hi @flipreverse, as I already commented on #689, PhASAR's CMake Configuration should be able to automatically find the correct LLVM installation. In addition, the bootstrap script is meant for the very first build of phasar only and it installs all system dependencies of phasar, as well as the correct LLVM version. Furthermore, it is not a good idea to force users to pass an additional argument to the cmake command (PHASAR_LLVM_INSTALL_DIR). |
I can ensure you, it doesn't. It looks at system paths, e.g.,
What do you think about an optional argument? |
|
Hi @flipreverse, |
That did the trick. Thx! :) Out of curiosity: Why are What do you think about the following patch? |
|
Hi @flipreverse, to answer your questions:
We simply did not have the use-case yet of installing LLVM to a custom location; probably
This sounds reasonable |
What is your opinion on the new commit? |
Currently, the custom build of LLVM must be located in /usr/local/llvm-14. If not, CMake will either fail finding LLVMConfig.cmake or use a different LLVM installation, e.g., the system-wide one. This will, for example, result in an include path different from the custom LLVM installation. This commit extends 'bootstrap.sh' to set 'LLVM_ROOT' to the custom installation. Moreover, it allows the user to select an arbitrary location for LLVM. (Fixed #689)
fabianbs96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks!
Currently, the custom build of LLVM must be located in /usr/local/llvm-14.
If not, CMake will either fail finding LLVMConfig.cmake or use a different LLVM installation, e.g., the system-wide one. This will, for example, result in an include path different from the custom LLVM installation.
This commit extends the CMake scripts to force the user to specify the variable PHASAR_LLVM_INSTALL_DIR that points to the LLVM installation directory.
This variable is also used to extend CMAKE_PREFIX_PATH which will make CMake use LLVMConfig.cmake from the custom build.
(Fixed #689)