Skip to content

Suggest x build library for a custom toolchain that fails to load core #113222

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

Closed
jyn514 opened this issue Jul 1, 2023 · 1 comment · Fixed by #113259 or #113292
Closed

Suggest x build library for a custom toolchain that fails to load core #113222

jyn514 opened this issue Jul 1, 2023 · 1 comment · Fixed by #113259 or #113292
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name/path resolution done by `rustc_resolve` specifically E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Jul 1, 2023

Code

x build std --target x86_64-unknown-linux-gnu
cd ../example
cargo +stage1 build --target i686-unknown-linux-gnu

Current output

error[E0463]: can't find crate for `core`
  = help: consider downloading the target with `rustup target add i686-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

Desired output

error[E0463]: can't find crate for `core`
  = help: consider adding the standard library to the sysroot with `x build library --target i686-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

Rationale and extra context

rustup doesn't manage targets and components for custom toolchains. We can detect in rustc that this is a custom toolchain by checking env!("CFG_RELEASE_CHANNEL") == "dev" and changing the help output if so.

Other cases

No response

Anything else?

cc https://discord.com/channels/442252698964721669/1124482842051747860

@jyn514 jyn514 added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-resolve Area: Name/path resolution done by `rustc_resolve` specifically T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. and removed E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Jul 1, 2023
@bors bors closed this as completed in 1366ad3 Jul 3, 2023
@Noratrieb Noratrieb reopened this Jul 3, 2023
@Noratrieb
Copy link
Member

This had to be reverted because it broke UI tests with channel=dev. #113288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-resolve Area: Name/path resolution done by `rustc_resolve` specifically E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
2 participants