Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

fix: ensure compiling against non x86_64 targets works #18

Merged
merged 6 commits into from
Jul 22, 2020

Conversation

dignifiedquire
Copy link

No description provided.

Comment on lines +3 to +5
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();

if target_arch == "x86_64" {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition is not needed as we ensured that the target arch is x86_64 by the cfg flag.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is very much needed, as it covers the case of cross compiling, the env variable is the actual target, and the cfg is the host target

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cfg-fu.

@porcuquine porcuquine merged commit 4a227c9 into master Jul 22, 2020
@porcuquine porcuquine deleted the fix/compile-nonx86 branch July 22, 2020 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants