llvm-link: Add support for archive files as inputs
authorJan Sjodin <jan_sjodin@yahoo.com>
Mon, 22 Jun 2020 17:04:12 +0000 (13:04 -0400)
committerJan Sjodin <jan_sjodin@yahoo.com>
Tue, 14 Jul 2020 19:30:59 +0000 (15:30 -0400)
commit66b409582a1d349a3ce5480237aeab92dd5ebde1
tree87a94de2c89e16665a76ff93807d97401d5ffbdc
parent6014c46c80cafa3dd817497c59224adb9727fbb0
llvm-link: Add support for archive files as inputs

This patch adds support for archive files as inputs to llvm-link. One
of the use-cases is for OpenMP, where device specific libraries need
to be extracted from libraries containing bundled object files. The
clang-offload-bundler will support extracting these archives, which
will be passed into llvm-link, see https://reviews.llvm.org/D80816.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D81109
llvm/test/tools/llvm-link/Inputs/f.ll [new file with mode: 0644]
llvm/test/tools/llvm-link/Inputs/g.ll [new file with mode: 0644]
llvm/test/tools/llvm-link/Inputs/h.ll [new file with mode: 0644]
llvm/test/tools/llvm-link/archive-bad.ll [new file with mode: 0644]
llvm/test/tools/llvm-link/archive.ll [new file with mode: 0644]
llvm/test/tools/llvm-link/archivell.ll [new file with mode: 0644]
llvm/tools/llvm-link/llvm-link.cpp