Clean up stale split debuginfo in incremental builds - #162561
Conversation
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? @bjorn3 (Since you responded on the issue.) |
Rustc never reads incr comp caches from different rustc versions. |
|
I feel like it would be better if we instead put all debuginfo in a new crate specific directory inside the output directory and then just clear out this directory right before codegen (or after codegen remove all files not listed as |
|
@bjorn3 That sounds like it could work as well. Perhaps that PR needs a new reviewer or a gentle ping? I don't think it has seen any review work since its conception in July. |
|
That PR is blocked on me resolving some review comments that That PR shouldn't be necessary for moving unpacked debuginfo into a separate directory. |
I don't understand this. As far as I understand the debuginfo files need to be right next to the object files otherwise the debugger can't find them. So either you move everything or nothing. You could probably move them and update the paths with some kind of arguments to the linker, but that's also more involved. |
You could also move the object files into this dir if necessary. They are removed after linking anyway (unless
The linker knows nothing about debuginfo. It just copies |
Fixes #161824.
LLM disclosure: I heavily used LLMs to navigate the codebase and suggest prototype solutions, but every line of code in the end result is written by me.
For the reviewer: there is one snag I don't fully grasp. This PR changes the
WorkProductstruct which I believe is serialized / deserialized. Is some sort of migration necessary so oldWorkProductsdeserialize correctly?