[PATCH] D32721: Accept archive files with no symbol table instad of warning on them.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 17:02:58 PDT 2017


pcc added a comment.

In https://reviews.llvm.org/D32721#742815, @davide wrote:

> hmm, I'm not entirely sure I agree with this one. (cc @rafael)
>  This has the drawback of of having to scan all the members in an archive so it's potentially expensive.


True, but on the other hand, it's pretty much the exact same work that the archiver would need to do, and asking the user to change their archiver and rebuild would probably consume even more time.

Once https://reviews.llvm.org/D32061 lands I expect this operation to be relatively cheap.

> We could maybe take the hit because the LTO time is dominated by opt/codegen but I'm under the impression the cost should be evaluated.

Opt/codegen should not be dominating in small incremental ThinLTO builds. We could evaluate it by measuring the impact on no-op incremental ThinLTO link time for a large application such as Chromium with/without archive symbol tables with this change patched in.
But the measurements I took for https://reviews.llvm.org/D32061 showed that just reading LTO symbol tables for Chromium takes at least 10-20 seconds at the moment.

> Also, I'm really worried about semantic changes, like two members with the same symbol name producing different results.

That is a concern, but in practice I'd expect it not to matter which member the linker chooses.


https://reviews.llvm.org/D32721





More information about the llvm-commits mailing list