Closed
Description
It is possible to ask rustc
to produce intermediate files (assembly, llvm-ir) without asking to produce object files. This works fine as long as incremental compilation is disabled. Once it is enabled - it fails in all sorts of ways - multiple asserts and with those removed - it fails to restore intermediate product from the cache since they are not cached (#123221 deals with that).
rm -rf *
touch lib.rs
rustc --emit asm --crate-type lib lib.rs -C incremental=foo
rustc --emit asm --crate-type lib lib.rs -C incremental=foo
Fails with this (and more)
thread 'cpy tzqeezh2sedvpj0' panicked at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/compiler/rustc_codegen_ssa/src/back/write.rs:890:5:
assertion failed: module_config.emit_obj != EmitObj::None
Options are:
- remove the asserts or allow them to pass if user never asked for object code in the first place
- change the logic such that requesting for byproducts implies request for object files