Commit 5d765b8
committed
Auto merge of rust-lang#123221 - pacak:cache_emit, r=fmease,jieyouxu
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#89149
Fixes rust-lang#88829
Related: https://internals.rust-lang.org/t/interaction-between-incremental-compilation-and-emit/205511 file changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
| |||
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
381 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
382 | 392 | | |
383 | 393 | | |
384 | 394 | | |
| |||
426 | 436 | | |
427 | 437 | | |
428 | 438 | | |
| 439 | + | |
| 440 | + | |
429 | 441 | | |
430 | 442 | | |
431 | 443 | | |
432 | 444 | | |
433 | 445 | | |
434 | 446 | | |
435 | 447 | | |
| 448 | + | |
| 449 | + | |
436 | 450 | | |
437 | 451 | | |
438 | 452 | | |
| |||
678 | 692 | | |
679 | 693 | | |
680 | 694 | | |
| 695 | + | |
| 696 | + | |
681 | 697 | | |
682 | 698 | | |
683 | 699 | | |
| |||
0 commit comments