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

Fix configuration when cross-compiling #329

Merged
merged 1 commit into from Jul 15, 2021
Merged

Fix configuration when cross-compiling #329

merged 1 commit into from Jul 15, 2021

Conversation

jmarshall
Copy link
Contributor

Even when cross-compiling, build.rs runs on the build host. Hence within build.rs #[cfg(target_os)] always reflects the host, not the target. Use $CARGO_CFG_TARGET_OS instead to query target properties.

Fixes #259.

@brainstorm brainstorm self-requested a review July 11, 2021 23:28
@brainstorm
Copy link
Member

brainstorm commented Jul 11, 2021

Thanks John! Could you provide some documentation and/or comments alongside as you did on twitter in the code? Also it seems like formatting is off.

Copy link
Member

@brainstorm brainstorm left a comment

Choose a reason for hiding this comment

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

Just a cargo fmt away, simples ;)

@jmarshall
Copy link
Contributor Author

The change is described in the commit message; beyond that, I don't know what documentation you're after.

I am not a rust developer and I am unfamiliar with your expected formatting. Moreover, I am not a rust-htslib user and I am not keen to devote further time to this. I would suggest that the maintainers are best placed to make any adjustments required should they choose to merge this bug fix.

@jmarshall
Copy link
Contributor Author

Comment added, assuming what you were after was a comment in the source itself to further dissuade anyone naively reverting this to #[cfg(target_os …)].

@coveralls
Copy link

coveralls commented Jul 15, 2021

Pull Request Test Coverage Report for Build 1032302039

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.008%) to 93.543%

Totals Coverage Status
Change from base Build 1031511633: 0.008%
Covered Lines: 11503
Relevant Lines: 12297

💛 - Coveralls

…uild.rs runs on the build host. Hence within build.rs `#[cfg(target_os)]` always reflects the host, not the target. Use $CARGO_CFG_TARGET_OS instead to query target properties.
@brainstorm brainstorm merged commit d5198e6 into rust-bio:master Jul 15, 2021
@brainstorm
Copy link
Member

CI seemed to be stuck picking old commit messages, even with correctly formatted with fix: <message> as indicated in https://www.conventionalcommits.org/en/v1.0.0/#summary.

Anyway, thanks John for the contribution.

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.

MUSL build fails on OSX
3 participants