compiletest panics with inscrutable error message when invoked the wrong way
Open
@jieyouxu is already working on this.
Since Dec 2, 2025.
A-compiletest
C-bug
T-bootstrap
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I typod some -- and ended up invoking ./x test debuginfo -- -- --debugger gdb. This is one -- too much, but the error I get is not very helpful:
$ ./x test debuginfo -- -- --debugger gdb
Building bootstrap
Finished `dev` profile [unoptimized] target(s) in 0.08s
/home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/ci-llvm/bin/llvm-strip does not exist; skipping copy
Building stage1 compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.14s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 lld-wrapper (stage0 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.06s
Building stage1 library artifacts (stage1 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.02s
Building stage1 compiletest (stage0 -> stage1, x86_64-unknown-linux-gnu)
Finished `release` profile [optimized + debuginfo] target(s) in 0.07s
Testing stage1 with compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu)
thread 'main' (451482) panicked at src/tools/compiletest/src/lib.rs:233:19:
OptionMissing("cc")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:00
I don't know what this means, but I had to entirely ignore this error and stare at my ./x invocation to figure out what I did wrong. We don't need polished errors from compiletest, but something more human-readable than OptionMissing("cc") would be good :)
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.
Assessment
This issue has not been assessed yet.