Skip to content

Commit

Permalink
Auto merge of #123221 - pacak:cache_emit, r=fmease,jieyouxu
Browse files Browse the repository at this point in the history
Save/restore more items in cache with incremental compilation

Right now they don't play very well together, consider a simple example:

```
$ export RUSTFLAGS="--emit asm"
$ cargo new --lib foo
     Created library `foo` package
$ cargo build -q
$ touch src/lib.rs
$ cargo build
error: could not copy
  "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.4qbzn9k8mosu50a5.rcgu.s"
  to "/path/to/foo/target/debug/deps/foo-e307cc7fa7b6d64f.s":
  No such file or directory (os error 2)
```

Touch triggers the rebuild, incremental compilation detects no changes (yay) and everything explodes while trying to copy files were they should go.

This pull request fixes it by copying and restoring more files in the incremental compilation cache

Fixes rust-lang/rust#89149
Fixes rust-lang/rust#88829

Related: https://internals.rust-lang.org/t/interaction-between-incremental-compilation-and-emit/20551
  • Loading branch information
bors committed Apr 7, 2024
2 parents 8afd4a6 + 7e8b1b6 commit 1de8838
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 1de8838

Please sign in to comment.