[PATCH] D19644: [ThinLTO] Option to control path of distributed backend files

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 09:46:58 PDT 2016


tejohnson added inline comments.

================
Comment at: test/tools/gold/X86/thinlto_prefix_replace.ll:4
@@ +3,3 @@
+; RUN: opt -module-summary %s -o %T/oldpath/thinlto_prefix_replace.o
+; RUN: rm -f %T/newpath/thinlto_prefix_replace.o.thinlto.bc
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
----------------
joker.eph wrote:
> Deserve a comment
Will add.

================
Comment at: tools/gold/gold-plugin.cpp:198
@@ -192,1 +197,3 @@
+  // bitcode file's path prefix matching oldprefix with newprefix.
+  static std::string thinlto_prefix_replace;
   // Additional options to pass into the code generator.
----------------
joker.eph wrote:
> What is the motivation for that?
In our particular instance it helps enable sharing of bitcode files across builds of different libraries or binaries. I.e. the bitcode files, the result of the first compile step, are output into one tree. When the ThinLTO link and backend steps execute, we want the resulting index/imports files to go into a different tree specific to the target binary/library. That way the same bitcode tree can be used as input across builds for multiple libraries/binaries. But this generally seems like useful functionality to allow flexibility in the build system.


http://reviews.llvm.org/D19644





More information about the llvm-commits mailing list