[PATCH] D28523: [ThinLTO] Ensure objects from static libraries linked in correct order

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 11:58:47 PST 2017


mehdi_amini added a comment.

I'm not fond of this patch, this does not seems it should belong here: the client of the API is providing the module in order, we should just return them back in the same order. Up to the client to handle this correctly.



================
Comment at: lib/LTO/LTO.cpp:839
+// an order where objects containing prevailing copies of weak symbols are
+// before any that contain non-prevailing copies of those weak symbols.
+// This ensures that the final native link selects the same copy as
----------------
That assuming that it is possible, i.e. that a linker will always ask for the first symbol to be the prevailing one (if it is not the case you may not be able to generate a topological sort)


https://reviews.llvm.org/D28523





More information about the llvm-commits mailing list