- Instead of writing empty index for file, this patch tracks the state of files in ObjectToIndexFileState. If the files are not indexed , only then we emit the empty files.
- For ThinLTO Index only, skip cache pruning and iterating over tasks, since there is at most one output object file
Details
Diff Detail
- Repository
- rLLD LLVM Linker
Event Timeline
lld/ELF/LTO.cpp | ||
---|---|---|
300 | There won't always be a regular LTO file created via splitting for ThinLTO builds, so Buff[0] should be empty some of the time. Do you have a test for this case? The other thing being done by the loop below is a call to createObjectFile, does that need to be done for Buff[0] if non-empty too? |
lld/ELF/LTO.cpp | ||
---|---|---|
300 | I have added the test as well to ensure that one file is generated in this case. We just need to save this file and, we don't need to call createObjectFile, since we exit from LLD just after this step. |
I think this needs to be moved after the call to LTO::run.