-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Pass the value of project.links into the build script #1220
Comments
Sounds like a good idea to me! Passing something like |
Dearest reviewer, This pull request allows the value of project.links to be passed into the build script via an environment variable. This closes rust-lang#1220 . I have added a test that makes sure that the environment variable is set. Also note I am using RUST_LIB not LIB because it appears to be used for windows in appveyor. I think RUST_LIB fits better. At the core of it when the manifest is created the code now check for the environment variable and uses it instead of the value from the file. I have also updated the documentation to reflect the new variable. Thanks! Becker
I did it backwards in my pull request. I was setting the links based on a variable. I am told I need to set the environment variable based on the links value. I am looking into setting the environment variable now. It looks like the standard lib https://doc.rust-lang.org/std/env/fn.set_var.html only sets the variable for the current running process. Which matches up with what I am seeing building /~https://github.com/PistonDevelopers/freetype-sys Also I noticed pistion build parses 3 mainifest files but the last links is different. Im guessing you would only care about the first parsed. Let me know if there is a known way to leak out environment variable changes. |
Ah yeah you'll probably want to call |
I am understanding better. The value needs to be passed to the internal build command system. I need to read up on this and how it works! Thanks |
Dearest Reviewer, This pull request allows the value of project.links to be passed into the build script via an environment variable. This closes rust-lang#1220 . I have added a test that makes sure that the environment variable is set. Also note I am using CARGO_LIB not LIB because it appears to be used for windows in appveyor. I think CARGO_LIB fits better. I have also updated the documentation to reflect the new variable. Thanks! Becker [Updated] Github comments moved to CARGO_MANIFEST_LINKS Fix if statement
The missing lib Dearest Reviewer, This pull request allows the value of project.links to be passed into the build script via an environment variable. This closes #1220 . I have added a test that makes sure that the environment variable is set. Also note I am using CARGO_LIB not LIB because it appears to be used for windows in appveyor. I think CARGO_LIB fits better. I have also updated the documentation to reflect the new variable. Thanks! Becker
It would be nice if the project's
links
value was available to the build script.Then build helpers like pkg-config could read that, so that
build.rs
could be a drop-in file suitable for all -sys projects where the library provides a pkg-config file with the same name.The text was updated successfully, but these errors were encountered: