ELF: Add libcall symbols to the link when LTO is being used.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 31 Jul 2018 20:36:17 +0000 (20:36 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 31 Jul 2018 20:36:17 +0000 (20:36 +0000)
commit2da4e521820bbe3c14313f95c2c7eaccd38b66eb
tree6d02fe44e149c3a9c9341fc572d1ec6f03f83c86
parentbb1078ad85bf812751da844f9a998626ece92f38
ELF: Add libcall symbols to the link when LTO is being used.

If any of our inputs are bitcode files, the LTO code generator may create
references to certain library functions that might not be explicit in the
bitcode file's symbol table. If any of those library functions are defined
in a bitcode file in an archive member, we need to arrange to use LTO to
compile those archive members by adding them to the link beforehand.

Differential Revision: https://reviews.llvm.org/D50017

llvm-svn: 338434
lld/ELF/Driver.cpp
lld/test/ELF/lto/Inputs/libcall-archive.ll [new file with mode: 0644]
lld/test/ELF/lto/libcall-archive.ll [new file with mode: 0644]