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

Building against LLVM with LLVM_BUILD_LLVM_DYLIB=OFF #276

Open
cgcgcg opened this issue Nov 28, 2023 · 2 comments
Open

Building against LLVM with LLVM_BUILD_LLVM_DYLIB=OFF #276

cgcgcg opened this issue Nov 28, 2023 · 2 comments

Comments

@cgcgcg
Copy link

cgcgcg commented Nov 28, 2023

I am trying to build against a pre-installed LLVM and CMake errors out here:

find_library(lib_llvm_path NAMES LLVM
LLVM-${LLVM_VERSION_MAJOR}
LLVM-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}
LLVM-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
PATHS ${LLVM_LIBRARY_DIR} ${LLVMLIBDIR}
REQUIRED
)

I believe the reason is that I don't have a single LLVM library (LLVM CMAKE option LLVM_BUILD_LLVM_DYLIB) but individual component libraries. I added clangAST to the list of names, and that build seems to go through. Is that a reasonable way of enabling builds against LLVM without a single shared library?

@lyskov
Copy link
Member

lyskov commented Nov 28, 2023

adding @andriish to the discussion

@andriish
Copy link
Contributor

Hi @cgcgcg,

you can try to add to the 'NAMES' at least one component. If that will work - depends, I don't know which OS do you use.

Andrii

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