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

cmake: add option to use llvm-config to find cross-target llvm deps #6387

Merged
merged 1 commit into from Oct 4, 2020
Merged

cmake: add option to use llvm-config to find cross-target llvm deps #6387

merged 1 commit into from Oct 4, 2020

Conversation

jjsullivan5196
Copy link
Contributor

Closes #6386

Copy link
Collaborator

@daurnimator daurnimator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR ZIG_PREFER_CLANG_CPP_DYLIB will override ZIG_FORCE_LLVM_CONFIG. Maybe worth s/FORCE/PREFER ?
Or can we find dynamic libraries with llvm-config?

@jjsullivan5196
Copy link
Contributor Author

@daurnimator Yeah, PREFER makes sense then, I'll change that out.

Also, are you suggesting there's a better way to go about solving the issue? I can try to make a more declarative option, but I didn't want to break any existing users of the cmake setup.

@daurnimator
Copy link
Collaborator

Also, are you suggesting there's a better way to go about solving the issue? I can try to make a more declarative option, but I didn't want to break any existing users of the cmake setup.

e.g. you might want to have this new option take precedence over ZIG_PREFER_CLANG_CPP_DYLIB

or I was wondering if llvm-config has some option that can replace ZIG_PREFER_CLANG_CPP_DYLIB's find_library in certain setups? (I vaguely recall we tried this once but it didn't work? maybe LLVM have fixed it now? or at least in the LLVM 11 release?)

@jjsullivan5196
Copy link
Contributor Author

Also, are you suggesting there's a better way to go about solving the issue? I can try to make a more declarative option, but I didn't want to break any existing users of the cmake setup.

e.g. you might want to have this new option take precedence over ZIG_PREFER_CLANG_CPP_DYLIB

or I was wondering if llvm-config has some option that can replace ZIG_PREFER_CLANG_CPP_DYLIB's find_library in certain setups? (I vaguely recall we tried this once but it didn't work? maybe LLVM have fixed it now? or at least in the LLVM 11 release?)

I think the current precedence is fine, since ZIG_PREFER_CLANG_CPP_DYLIB is meant to override using llvm-config in the first place. I'll clarify in the doc comment for this option.

As for llvm-config replacing ZIG_PREFER_CLANG_CPP_DYLIB, I'm not sure of that myself.

@jjsullivan5196
Copy link
Contributor Author

I changed the wording per @daurnimator's suggestion

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

Successfully merging this pull request may close these issues.

cmake doesn't allow using llvm-config for cross builds
3 participants