Skip to content

rustc lost compiler flag information in its backtrace #101588

Closed
@matthiaskrgr

Description

@matthiaskrgr

Noticed while digging around in incremental compilation bugs:
I run something like rustc 101518-1.rs -Cincremental=/tmp/a -Zincremental-verify-ich=yes --crate-type lib

rust 1.58.0 would print the flags that caused the ICE like this:

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.58.0 (02072b482 2022-01-11) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z incremental-verify-ich=yes -C incremental --crate-type lib

while 1.60.0 would print it like this:

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0 (7737e0b5c 2022-04-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -C incremental -Z incremental --crate-type lib

The problem here is that -Z incremental-verify-ich=yes somehow became -Z incremental between 1.58 and 1.60, and -Zincremental is not even a valid flag 😅

The current rustc 1.65.0-nightly (c2804e6ec 2022-09-07) output is note: compiler flags: -C incremental -Z incremental --crate-type lib which is quite garbage since both, the actual -Cincremental path and the rest of -Zincremental are missing,

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.P-mediumMedium priorityregression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions