-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix package detection and build when cross-compiling from MSVC to GNU
I and @dragonmux found two issues when building libusb from a MSVC host to a MinGW target. When the build.rs script is built for the MSVC host, - the vcpkg crate is used for detection (which correctly detects the MinGW target and reports an unsupported ABI) - a MSVC flag is applied to the build (and thus breaking the build altogether) This commit fixes both issues by changing vcpkg to a Windows-wide dependency, and then if CARGO_CFG_TARGET_ENV is indeed MSVC, it is used and the /source-charset:utf-8 flag is applied.
- Loading branch information
Showing
2 changed files
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters