Commit ac4b1c8
committed
feat: maximize artifact reuse between different modes.
As of this writing, it aims to reuse `rmeta` between build and check modes.
(one emits rmeta + rlib, and the other emits rmeta)
This has a caveat that `DefId` in rmeta files might not match between rustc
invocations with different `--emits` values, and that might lead to rustc
rejecting the input rmeta. To avoid failures in rustc, this is currently
guarded by fingerprint to ensure all output files present, if not, rerun.
This make running `check` after `build` safe: `build`'s rmeta files might
have more information and rustc is correct on rejection.1 parent a7715cb commit ac4b1c8
7 files changed
Lines changed: 37 additions & 7 deletions
File tree
- src/cargo/core/compiler
- build_runner
- fingerprint
- tests/testsuite
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
253 | 273 | | |
254 | 274 | | |
255 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
603 | 608 | | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
607 | 612 | | |
608 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
609 | 620 | | |
610 | 621 | | |
611 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2416 | 2416 | | |
2417 | 2417 | | |
2418 | 2418 | | |
2419 | | - | |
| 2419 | + | |
2420 | 2420 | | |
2421 | 2421 | | |
2422 | 2422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3210 | 3210 | | |
3211 | 3211 | | |
3212 | 3212 | | |
3213 | | - | |
3214 | | - | |
| 3213 | + | |
3215 | 3214 | | |
3216 | 3215 | | |
3217 | 3216 | | |
| |||
3229 | 3228 | | |
3230 | 3229 | | |
3231 | 3230 | | |
| 3231 | + | |
3232 | 3232 | | |
3233 | 3233 | | |
3234 | 3234 | | |
| |||
0 commit comments