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

Use cargo's CARGO_CFG_TARGET_ARCH env variable #3

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

Grinkers
Copy link
Collaborator

For build.rs, cfg's target_arch will use the toolchain instead of --target. For example, even when using "--target i686-unknown-linux-gnu", it would try to use vendor/linux/x64 for bindgen and searching for the static library.

https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts

This should also resolve #1 as this should work for all targets from all toolchains.

@newAM
Copy link
Member

newAM commented Dec 28, 2020

Good catch, thanks!

@newAM newAM merged commit 94401ef into ftdi-rs:master Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support more targets.
2 participants