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

confusing relationship between metadata passing and 'links' #3304

Closed
comex opened this issue Nov 20, 2016 · 1 comment · Fixed by #7565
Closed

confusing relationship between metadata passing and 'links' #3304

comex opened this issue Nov 20, 2016 · 1 comment · Fixed by #7565
Labels
A-build-scripts Area: build.rs scripts A-documenting-cargo-itself Area: Cargo's documentation A-links Area: `links` native library links setting

Comments

@comex
Copy link

comex commented Nov 20, 2016

When I read the documentation for build scripts, my impression was that metadata passing via DEP_* environment variable was supported for all crate dependencies. I was confused why part of the description of this mechanism was in the "links" section, but based on the wording, I figured native libraries were only an example use case for what seemed to be a general purpose mechanism for one build script to pass information to another.

In fact, DEP_* environment variables will only be passed for dependencies that declare some value for links, and in fact that value is what gets put between DEP_ and the custom key (I would expect it to be the crate name). Maybe I'm bad at reading, but I only figured this out by reading the source.

It would be nice if the documentation were made more explicit, but really I'd like a similar mechanism for things other than native libraries. For now I guess I'm going to just put a fake links value in my Cargo.toml...

@alexcrichton alexcrichton added the A-documenting-cargo-itself Area: Cargo's documentation label Nov 20, 2016
@alexcrichton
Copy link
Member

Ah yeah definitely sounds like we can bolster up the docs around here.

@ehuss ehuss added the A-links Area: `links` native library links setting label Oct 12, 2019
@ehuss ehuss added the A-build-scripts Area: build.rs scripts label Oct 23, 2019
@bors bors closed this as completed in #7565 Nov 7, 2019
@bors bors closed this as completed in 22b08c4 Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-scripts Area: build.rs scripts A-documenting-cargo-itself Area: Cargo's documentation A-links Area: `links` native library links setting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants