-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
x.py install does nothing when target
is set but host
is not
#76990
Comments
It looks like this regressed in #76415, cc @Mark-Simulacrum |
The default stage for |
@tmandry Can you tell me what your config.toml contains? With an empty one I cannot seem to reproduce; I see x.py install go off to build a compiler at least (I did not wait for it to finish). |
Here's a config.toml:
Oddly if I remove |
Okay, I think I know what the problem is. That target config in build means that we're not building any host-only steps, of which I think everything except docs (edit: and analysis, which I think is save-analysis data, certainly not needed, but explains the tools thing) are currently in x.py install. Why everything is host-only, I'm not sure; I think at least std should not be. What do you expect to install in that scenario? A full compiler toolchain? |
Yes (edit: and libstd/libtest), or at least that's what happened in the past. For what it's worth we normally specify more targets than just the one, but this was enough to show the issue. (It does the same thing when there are multiple targets) |
Hm, okay. So the past behavior was almost certainly either a bug or at least unintentional. I think std should be installed for every target, but everything else I wouldn't expect to get installed without a configuring the platform as a host; if you want full toolchains you likely want target and host to be configured identically. |
I only need one host, multiple targets. It's surprising to me that specifying a target appears to override the default host? |
Maybe I'm confused about the role of host and target. Let's say I want the compiler to run only on linux x64, and be able to target linux-x64, fuchsia-x64, fuchsia-arm64. What should my configuration be? |
host = x64 linux The behavior of implicitly setting host to empty if only target is specified is not necessarily desirable, it's just a historical artifact (used to be only on command line, the PR you cited earlier made it uniform between files and CLI). I think removing that behavior and requiring an explicitly empty host list probably makes sense, if you truly only want target artifacts. |
target
is set but host
is not
Okay, I'm working on a change to do that. Thanks for the explanation! |
…crum bootstrap: Always build for host, even when target is given This changes the behavior from *not* building for host whenever an explicit target is specified. I find this much less confusing. You can still disable host steps by passing an explicit empty list for host. Fixes rust-lang#76990. r? `@Mark-Simulacrum`
We pick up the latest (currently) Rust stable version, 1.48.0. miri fails to compile (even though the build succeeds) which is okay-ish. See: rust-lang/rust#79582 and rust-lang/rust#74709 for more details. It's not clear why exactly we need to specify the host as a target now, too. But I guess previously things just worked by chance. The correct thing to do is to specify `x86_64-unknown-linux` as target, too, given that we are targetting it, e.g. with `cbindgen`. Note: we could think about specifying `--host` here too, but it seems we can avoid that extra configure argument, see: rust-lang/rust#76990.
We pick up the latest (currently) Rust stable version, 1.48.0. miri fails to compile (even though the build succeeds) which is okay-ish. See: rust-lang/rust#79582 and rust-lang/rust#74709 for more details. It's not clear why exactly we need to specify the host as a target now, too. But I guess previously things just worked by chance. The correct thing to do is to specify `x86_64-unknown-linux` as target, too, given that we are targetting it, e.g. with `cbindgen`. Note: we could think about specifying `--host` here too, but it seems we can avoid that extra configure argument, see: rust-lang/rust#76990.
With a valid install prefix under
install.prefix
in config.toml, I see this:But nothing is installed. This is a recent regression. At first I thought it had to do with the default stages changing, but passing
--stage
doesn't seem to have an effect.The text was updated successfully, but these errors were encountered: