Skip to content
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

Requiring --force-non-host for *-pc-windows-gnu #2765

Closed
tspiteri opened this issue May 11, 2021 · 3 comments · Fixed by #2782
Closed

Requiring --force-non-host for *-pc-windows-gnu #2765

tspiteri opened this issue May 11, 2021 · 3 comments · Fixed by #2782

Comments

@tspiteri
Copy link

When I try to install a *-pc-windows-gnu toolchain on Windows, I always get something like

error: DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain as the default.
warning: toolchain '1.37.0-x86_64-pc-windows-gnu' may not be able to run on this system.
warning: If you meant to build software to target that platform, perhaps try `rustup target add x86_64-pc-windows-gnu` instead?

Does it really make sense to require --force-non-host for a GNU toolchain install under Windows? I do not want to cross compile, so I don't think it makes sense to use rustup target add instead.

@tspiteri tspiteri added the bug label May 11, 2021
@kinnison
Copy link
Contributor

I agree, we ought not to give this warning for these toolchain variants. @rbtcollins do you agree? I think it ought to be fairly easy to special-case the windows gnu/msvc variants here.

@rbtcollins
Copy link
Contributor

This and #2773 are dupes I think.

And yeah, the intent for force-non-host was to make the cross project use cases which we do need to support possible while allowing us to make casual use of them a hard error in a future release. Looks like the heuristic for it isn't complete yet.

As for 'cross compiling' - whether the host is built with msvc or gnu doesn't make it into a cross compiler as I understand things in this specific unusual case...; it will affect the rustc internals and performance, and we would very much recommend always using the msvc built toolchain, even if targeting gnu outputs. build.rs scripts etc will still be able to run, as your host is able to run them. IMBW, as this isn't a part of the system I've super deeply dived on.

@tspiteri
Copy link
Author

It still looks like is a cross compiler to me, for example cargo test won't build and test doctests if using --target. (I don't know if there's some cargo trickery to make it work, but it doesn't by default.) It also just looks weird to me that rustup wouldn't want me to just install a tier 1 toolchain without force flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants