-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix rustc-cfg usage #135
Comments
I have created and published the cargo-rustc-cfg crate. The |
There are a couple of issues popping up with the cargo-rustc-cfg crate. Cargo is building the project every time for every target because it does not abort the build process or "dry run" when the Really the Cargo Rust Compiler (rustc) configuration is just needed to detect the CRT feature (#115), and the rest might be obtained from just the rustc configuration (rustc-cfg crate) using the |
A mechanism for obtaining the Cargo-based compiler configurations. It will take a while for it to reach stable for Cargo, but this will greatly unify resolution of this issue along with resolving #115. The cargo-rustc-cfg crate will also need to be updated, but that will eventually replace usage of the rustc-cfg crate here. Once this issue is resolved and the |
The rustc-cfg crate uses the
rustc --target <triple> --print cfg
command, which works for determining toolchain/target information but it will not work for determining Cargo-based compiler configurations, such as features enabled or disabled via theRUSTFLAGS
environment variable. Thecargo rustc -- --print cfg
and optionally thecargo rustc --target <triple> -- --print cfg
commands should be used instead. The rustc-cfg crate does not appear to support thecargo rustc
command. I am in the process of creating a newcargo-rustc-cfg
crate inspired by the rustc-cfg crate that does use thecargo rustc
commands. The rustc-cfg crate should then be replaced with this new one.The text was updated successfully, but these errors were encountered: