[PATCH] D56046: Output ELF files after ThinLTO is run.

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 23:33:51 PST 2018


void created this revision.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, arichardson, inglorion, emaste.
Herald added a reviewer: espindola.

The gold linker allowed you to output the ELF files after LTO was run. It did
it by using the 'obj-path' option. This replicates that behavior.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D56046

Files:
  ELF/LTO.cpp


Index: ELF/LTO.cpp
===================================================================
--- ELF/LTO.cpp
+++ ELF/LTO.cpp
@@ -240,6 +240,9 @@
 
   checkError(LTOObj->run(
       [&](size_t Task) {
+        if (!Config->ThinLTOIndexOnly && !Config->LTOObjPath.empty())
+          return llvm::make_unique<lto::NativeObjectStream>(
+              openFile((Config->LTOObjPath + utostr(Task)).str()));
         return llvm::make_unique<lto::NativeObjectStream>(
             llvm::make_unique<raw_svector_ostream>(Buf[Task]));
       },


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56046.179412.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181222/f85731ed/attachment.bin>


More information about the llvm-commits mailing list