Closed
Description
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.)