-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Link a rustup toolchain automatically in x.py setup
#89206
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
./x.py setup --build N --toolchain-link $NAME
./x.py setup --build $N --toolchain-link $NAME
Can you say more about the motivation? Initially, I would say that it is pretty likely that we do not want to support this kind of "aggregation" in the x.py interface; it complicates the information and I'm not sure it improves the user interface. |
I agree that I don't think it improves the user interface much, but I think that the interface for this specific feature could be made better. My only argument for why I think this capability should be added is that it's natural to create a toolchain for the compiler immediately after having built it, so why not give However, as I understand it you only need to run |
I think streamlining the toolchain creation process is worthwhile to invest into; e.g., we could give a suggestion at the end of the first x.py build in a new build directory (with a stamp file just saying 'did that') to run rustup link .... with the appropriate path. |
I like that idea. I'll wait for more feedback before I start looking into it though. |
Hmm, I would rather set up the toolchain automatically when running If we gave a warning the first time you run |
Yeah, x.py setup seems better. I think rustup won't let you do it without the sysroot somewhat existing, though:
But I think we have enough in setup that we can probably create the directory temporarily... |
./x.py setup --build $N --toolchain-link $NAME
x.py setup
Mentoring instructions: just after Line 108 in bf64232
rustup toolchain link stage1 build/TARGET/stage1 , where TARGET is builder.config.build . If that errors, give a warning and suggest that the user do it themselves.
|
Could you clarify this? I assumed you were referring to |
@Sl1mb0 it derefs to Build, which should have a Config field. |
It should be noted that the toolchain linking/unlinking rustup does is not always just a symlink, it is sometimes a hardlink, depending on the OS. This can cause issues because it makes the linkage inherently touchier. I am not saying this should not be done, merely that if someone finds this issue later after it causes trouble, then it should become special-cased by OS. |
@rustbot claim |
x.py: run `rustup toolchain link` in setup Addresses rust-lang#89206 r? `@jyn514`
x.py: run `rustup toolchain link` in setup Addresses rust-lang#89206 r? ``@jyn514``
…etup, r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](rust-lang#92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by `@Sl1mb0.` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc `@jyn514` and `@Mark-Simulacrum` as they were active in rust-lang#89206
…etup, r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](rust-lang#92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ``@Sl1mb0.`` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc ``@jyn514`` and ``@Mark-Simulacrum`` as they were active in rust-lang#89206
…etup, r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](rust-lang#92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ```@Sl1mb0.``` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc ```@jyn514``` and ```@Mark-Simulacrum``` as they were active in rust-lang#89206
…etup, r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](rust-lang#92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by ````@Sl1mb0.```` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc ````@jyn514```` and ````@Mark-Simulacrum```` as they were active in rust-lang#89206
…etup, r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](rust-lang#92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to rust-lang#89212 by `````@Sl1mb0.````` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc `````@jyn514````` and `````@Mark-Simulacrum````` as they were active in rust-lang#89206
Uh oh!
There was an error while loading. Please reload this page.
Issue tracker for linking a rustup toolchain automatically in
x.py setup
.The text was updated successfully, but these errors were encountered: