-
Notifications
You must be signed in to change notification settings - Fork 503
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
Relax the build target checks in windows-targets sub-crates #2774
Conversation
This allows e.g. x86_64-win7-windows-msvc and other alternative vendors to link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being less sensitive to the precise target name seems like it might lessen churn in the future. Obviously win9x support is off-label use of this crate but if it works then fair enough.
My only other comment is that if this is worth doing then it's worth doing for all the target crates, not just the msvc ones. |
Agreed, just wasn't sure about the target_abi (for gnu vs gnullvm) checks. If someone could chime in there I'll update it asap! |
Ah, unfortunately So it'd need to be parsed from the target string. |
That's what I thought as well, but wasn't sure anymore after seeing windows-rs/crates/libs/targets/Cargo.toml Line 28 in a6bdfc8
Anyways, would a check for |
I went ahead and added those changes as a separate commit 👍 |
3c5c3d5
to
01b0ae0
Compare
It's quite a mess since (a) |
gnu/llvm is potentially getting promoted to a tier 2 target soon so I'll try to push for stabilization of |
Yikes, these conditionals are hard to review without loading up a bunch of toolchain context. If the tests pass, that's great. But it would be helpful to see table of supported targets and the attributes being used to identify them to understand the composition. (Not a blocker here.) |
Documented here: https://doc.rust-lang.org/cargo/reference/environment-variables.html Be good to have some targeted yml workflows that verify each target. |
Another positive consequence of this change is that you can now use windows-sys with (I discovered this PR because I was trying to figure out why the released windows-sys didn't work for me even though the code at Git head did...) |
The panic hook is to show the panic payload with a message box. Updating `windows` to 0.53.0 is to fix the build with `i686-win7-msvc-windows` target, which provides binaries with Windows7 support. (microsoft/windows-rs#2774)
The panic hook is to show the panic payload with a message box. Updating `windows` to 0.53.0 is to fix the build with `i686-win7-msvc-windows` target, which provides binaries with Windows7 support. (microsoft/windows-rs#2774)
I've done this change for Rust9x initially, but realized that the recently-added tier3
win7
targets also fail to link with the strict check in the target crates:This change aligns the checks for the msvc targets with the checks in
crates\libs\targets\Cargo.toml
.I didn't touch the gnu/gnullvm ones since I'm unclear about
target_abi
actually being stable/checkable yet. LMK if I should add the respective checks.Also please feel free to close if this doesn't align with windows-rs. For example, technically it could be interpreted as support for unsupported target vendors.
CC @roblabla