diff options
Diffstat (limited to 'lld/COFF/LTO.cpp')
| -rw-r--r-- | lld/COFF/LTO.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp index 4b71dbdd2e2..7aa3b17e24d 100644 --- a/lld/COFF/LTO.cpp +++ b/lld/COFF/LTO.cpp @@ -177,6 +177,8 @@ std::vector<StringRef> BitcodeCompiler::compile() { // files. After that, we exit from linker and ThinLTO backend runs in a // distributed environment. if (config->thinLTOIndexOnly) { + if (!config->ltoObjPath.empty()) + saveBuffer(buf[0], config->ltoObjPath); if (indexFile) indexFile->close(); return {}; |

