using ~/.cargo/config.toml to enable cranelift results in a confusing error when bootstrapping rustc
Open
Nobody has claimed this yet.
C-discussion
D-confusing
T-bootstrap
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
the offending config:
# .cargo/config.toml
unstable.codegen-backend = true
# commenting out the following line will allow rustc to bootstrap successfully
profile.dev.codegen-backend = "cranelift"
the errror:
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* /home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0
* /home/binarycat/src/rs/rust/build/x86_64-unknown-linux-gnu/stage0
reproduction steps:
- enable download-rustc
- remove all of
build/ ./x doc library/core(probably any build command works)
there's a lot of workarounds for this, but i was only able to diagnose it on a hunch, so at the very least the error message should be more clear.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names ~/.cargo/config.toml and the ./x doc library/core entry point; begin by reproducing with download-rustc after removing build/. Compare the failing configuration with the version where profile.dev.codegen-backend is commented out. Done means the bootstrap failure explains the configuration issue clearly instead of only reporting a missing codegen-backends folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100