Allow using vcpkg on any Windows target, and use find_package#509
Open
micolous wants to merge 3 commits intoalexcrichton:mainfrom
Open
Allow using vcpkg on any Windows target, and use find_package#509micolous wants to merge 3 commits intoalexcrichton:mainfrom
micolous wants to merge 3 commits intoalexcrichton:mainfrom
Conversation
13 tasks
Author
|
@alexcrichton Any feedback on this? This is currently the last PR blocking mcgoo/vcpkg-rs#52, because |
Owner
|
Sorry for the delay, but I'm not confident myself signing off on this just yet. I would need to investigate the relevant packages and pieces involved here to ensure that everything works as I'd expect and I don't see any issues with this integration. I don't have the time to do this right now, though. @sagebind do you have thoughts on this though? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change addresses two issues building for Windows:
Allow using
vcpkgon any Windows build, not just MSVC.vcpkg-rsincludescurl-sysas part of its integration tests, butcurl-sysincludes extra guards which block its use with non-MSVC targets. While it doesn't support-pc-windows-gnu(mingw) yet, its integration tests will try to buildcurl-sys, so these guards are a problem.That part of the change should have no effect for
*-pc-windows-gnu, and should still fall back to existing options.Using
vcpkgwith the GNU toolchain is particularly useful for cross-compiling Windows binaries on non-Windows platforms where MSYS' version ofpacmanis not available. Technically you could also usevcpkgto provide non-Windows platforms' libraries, but I haven't gone that far as yet.Try to use
vcpkg::find_packageforlibcurland its dependencies, rather than trying to guess which features it was built with.Those guesses are currently wrong on
-pc-windows-gnu, as they assume MSVC-style library naming (sozlibis broken); but I've left these alone for now to reduce risk.Those guesses also result in spurious additional linkages on
-pc-windows-msvc: for example, ifcurlwas not built withlibsshoropensslsupport, butlibsshoropensslwas installed on the build machine, it would result in a useless extra linkage.While here, I've disabled
fail_fastin the CI configuration, as a single-platform flake cancels tests on slower platforms (eg: MSVC).