[PATCH] D22677: [ThinLTO/gold] Support for getting list of included objects from gold

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 09:05:59 PDT 2016


tejohnson added a comment.

In https://reviews.llvm.org/D22677#492908, @davidxl wrote:

> How about adding functional test cases to cover issues mentioned in the mentioned previous reviews?


Because the support for the callback returning the LDPS_NO_SYMS value was added only recently, and there isn't a way to guard against an older version of gold in the tests (mentioned in the comment within the new test).


================
Comment at: test/tools/gold/X86/thinlto_emit_linked_objects.ll:18
@@ +17,3 @@
+; RUN:    %t.o \
+; RUN:    --start-lib %t2.o --end-lib
+
----------------
davidxl wrote:
> Perhaps add test case about real archive case as well.
For a distributed build the build system needs to extract the constituent objects (otherwise the combined index paths will not point to an object file)

================
Comment at: test/tools/gold/X86/thinlto_emit_linked_objects.ll:21
@@ +20,3 @@
+; RUN: cat %t3 | FileCheck %s
+; CHECK: thinlto_emit_linked_objects.ll.tmp.o
+; CHECK: thinlto_emit_linked_objects.ll.tmp2.o
----------------
davidxl wrote:
> Can the name between bitcode file and final object files be made more related ? 
The ThinLink gold invocation doesn't know the name of the final object files. But note that if a prefix replace path is specified (thinlto-prefix-replace=oldprefix:newprefix plugin option), then the names emitted will have the matching prefix path replaced with the new one. This can be used to get the paths to the final object files into the file, as long as the final objects use the same names but a different path (true in bazel). Otherwise the build system would need to do post-processing of the list to map to the final object files it is going to create - known by the build system but not by gold here.


https://reviews.llvm.org/D22677





More information about the llvm-commits mailing list