-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.