-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add support for mingw (-pc-windows-gnu) targets #52
base: master
Are you sure you want to change the base?
Conversation
Thank you for taking this on! To be honest I personally have a very poor grasp of Windows target triples, so I doubt that I am going to be able to review any work here with a lot of expertise. One thing I did want to mention is that I do know that |
Yeah, my main reason for doing this is to enable cross-compilation from non-Windows hosts to Windows targets, and the PRs I have out for |
@micolous Is this PR still a draft? I see that the |
@pkgw Per the initial comment, it's still blocked on alexcrichton/curl-rust#509. It's pointing at my forks because I was waiting for pull requests to land, and for a release of those packages. It looks like my PRs As for "why": IMO, Rust crates shouldn't silently auto-vendor (it makes dependency management extremely difficult). However, it'll be a SemVer-incompatible change to remove that, and both of those crates need to work out some of their build script limitations in the process (eg: introducing build-time configuration like Fixing all of that is way beyond my originally-intended scope – I only really care about linking against OpenSSL, and I believe that An alternative is that if 🤷 |
This PR now drops I've started a CI run, but this will take a while. |
Thanks for the status update! |
I'm afraid I don't actually know. @waych? I think it looks like that tree just contains the results of successful vcpkg installs, with the binaries all replaced with zero-size files? In digging through the repo history I don't see any explanation of how the files were generated, though. |
Hi sorry I won't be able to look at this until next week at best. |
Spent some time looking at this and your other PRs related to making this work. I don't see much problem with getting the wiring for the targets in, but it is very unfortunate that the CI is blocked requiring other changes you are pushing to other projects. I dug through these PRs too it mostly makes sense to me what you are doing. I understand the quest for disabling autovendoring, but also sort of agree with the counter argument that having to opt-in to autovendor for crates is a potential cause of friction for oncoming new cargo/rust users. Have you considered Byron's suggestion of having the autovendoring be disabled by some flag? Introducing a community environment variable like CARGO_AUTOVENDOR_OPTOUT or something that can be set in config.toml.env, and that various build.rs can pivot off of to disable the autovendor support altogether? That does avoid the semver bump doesn't it? I don't understand the parts of the discussion I've seen trying to associate static linking with the use of autovendored libs. Could you please elaborate on that? Seems unrelated to me / I need help seeing the connection there, as it still makes sense to link statically with other options. As for the files in
I have a project that I'll be trying these mingw changes out with in the coming days, so I'll let you know how it goes. |
Fixes #48
Open questions:
link_lib_name_is_correct
tests for mingw. How do I generate new targets intest-data/normalized
?Currently blocked on:
vcpkg-rs
integration tests:curl
,openssl-sys
, andlibz-sys
to test those pull requests properlylibz-sys
: https://github.com/rust-lang/libz-sys/releases/tag/1.1.10curl-rust
: waiting for merge...openssl-sys
: https://github.com/sfackler/rust-openssl/releases/tag/openssl-sys-v0.9.91*-pc-windows-gnullvm
targets; though this is currently Tier 3 so may be difficult to test in CI.