Skip to content

Use proper generator configuration in MinGW Windows toolchain #46

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

Merged
merged 2 commits into from
Jul 10, 2018

Conversation

Osspial
Copy link
Contributor

@Osspial Osspial commented Jul 10, 2018

This fixes Windows builds where MSYS2 isn't installed, but MinGW is. Uses the technique described in #3 (comment).

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

src/lib.rs Outdated
// If make.exe isn't found, that means we may be using a MinGW
// toolchain instead of a MSYS2 toolchain. If neither is found,
// the build cannot continue.
let has_msys2 = Command::new("make").spawn().err()
Copy link
Member

Choose a reason for hiding this comment

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

Could this try to use something like make --version instead of make which could accidentally try to do some work? Additionally, could this use .output() to squelch all output and otherwise just test if the binary exists? (searching PATH would also be fine)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I've made both of those changes in the new commit.

Add --version argument and change spawn() to output().
@alexcrichton alexcrichton merged commit cf623eb into rust-lang:master Jul 10, 2018
@alexcrichton
Copy link
Member

🥥

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.

2 participants