Skip to content

compiletest panics with inscrutable error message when invoked the wrong way #149523

@RalfJung

Description

@RalfJung

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 :)

Metadata

Metadata

Assignees

Labels

A-compiletestArea: The compiletest test runnerC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions