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

Provide target-cpu and target-features to buildscripts #7828

Closed
lukaslueg opened this issue Jan 25, 2020 · 2 comments
Closed

Provide target-cpu and target-features to buildscripts #7828

lukaslueg opened this issue Jan 25, 2020 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@lukaslueg
Copy link
Contributor

lukaslueg commented Jan 25, 2020

As far as I can see there is no reliable way for a buildscript to determine the value of target-cpu and target-features. Could we add and env-flag for Cargo to provide the values that will be used when the final crate is compiled for the target platform?

Downstream feature request from here

@lukaslueg lukaslueg added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jan 25, 2020
@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2020

Target features should be exposed in the CARGO_CFG_TARGET_FEATURE environment variable. The request to expose the target-cpu is tracked in rust-lang/rust#44036.

@ehuss
Copy link
Contributor

ehuss commented Feb 3, 2020

Going to close since supporting target-cpu is tracked in rustc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants