Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Make the crate cross-compilation-friendly #4

Merged
merged 1 commit into from
Dec 12, 2018

Conversation

tomaka
Copy link

@tomaka tomaka commented Dec 5, 2018

Fix #1

Uses undocumented stuff. However it looks like a lot of people are using these variables, so I suppose it's fine.
If Cargo breaks backwards compatibility, Parity's CI will detect it.

@tomaka
Copy link
Author

tomaka commented Dec 10, 2018

r? @debris @arkpar @andresilva (I don't know who to ping exactly

Copy link

@andresilva andresilva left a comment

Choose a reason for hiding this comment

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

Yeah we're already using these semi-secret env vars for the snappy build.

let mut base_config = cc::Build::new();
base_config.include(".");
base_config.include("libusb/libusb");

if cfg!(target_os = "macos") {
if target_os == "macos" {

Choose a reason for hiding this comment

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

Do these always match or should we use contains instead for all checks?

Copy link
Author

Choose a reason for hiding this comment

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

I assume that CARGO_CFG_TARGET_OS contains the same value as cfg!(target_os), and right now it works by matching exactly, so I suppose it will still continue to work by matching exactly.

@TriplEight
Copy link

👍

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