Skip to content

ICE: incremental compile + thin LTO immediately panics on 2nd compile with "failed to open bitcode file" #66371

Closed
@pnkfelix

Description

@pnkfelix

Steps to reproduce:

% mkdir temp
% cd temp
% touch lib.rs
% rustc +nightly --version
rustc 1.40.0-nightly (4f03f4a98 2019-11-12)
% rustc +nightly lib.rs --crate-type=lib -C incremental=incr -C lto=thin
% rustc +nightly lib.rs --crate-type=lib -C incremental=incr -C lto=thin
thread 'rustc' panicked at 'failed to open bitcode file `/home/pnkfelix/Dev/Mozilla/issue59535/foo/temp/incr/lib-2274d9nt8ooh9/s-fht\
by5f755-xye94s-working/41tp7ytbumzkt3gk.pre-lto.bc`: No such file or directory (os error 2)', src/librustc_codegen_ssa/back/write.rs\
:1877:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.40.0-nightly (4f03f4a98 2019-11-12) running on x86_64-unknown-linux-gnu

note: compiler flags: -C incremental -C lto=thin --crate-type lib

(If its common knowledge that one cannot use ThinLTO with incremental compiles, I certainly was not aware of it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions