-
Notifications
You must be signed in to change notification settings - Fork 79
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 disabling pkg-config altogether #141
Comments
That seems out of scope for cargo really needs a better mechanism for external dependency discovery and building. |
Hm, but it looks like people use So having the feature to disable this for one dependency, but not for all, doesn't seem reasonable to me. |
The main problem here is that this is not really composable. You would set this environment variable and it would affect literally every crate in your dependency tree that uses Hence my comment that this would ideally be solved at a higher level, ideally in cargo itself by providing mechanisms for external dependency discovery / building. The way how it is right now, everybody implements their own artisanal |
Which is exactly what I would like to achieve. As right now, adding a new dependency to the tree (especially unintentionally) would simple enable using pkg-config. However, if I want to opt-out of using pkg-config, and use an "all vendored" approach, I wouldn't be aware of this. Having a flag to completely opt-out of pkg-config would ensure that a failing build make me aware of that fact, allowing me to choose a way to deal with this. |
You could also set But even then this doesn't prevent some |
I any case, I agree that there should be a more generic way to deal with this in cargo! And using It is true that it wouldn't prevent any library to do something in addition. But I saw a bunch of I also understand that this isn't an issue created by Then again, the changed sounds simple to me, and follows an existing pattern in If you disagree, then I guess |
I'm not sure, ideally I'd like to not add new such API unless absolutely needed. Maybe @thomcc has a second opinion here? |
As I understood it is possible to disable
pkg-config
for a single dependency usingFOO_NO_PKG_CONFIG
.However, I didn't see any way to disable this for all crates. Similar to the
PKG_CONFIG_ALL_STATIC
variable.I think support for this would make sense to fall back to an "all vendored" build. Failing the build if that isn't possible or misconfigured.
The text was updated successfully, but these errors were encountered: