[ClangPackager] Add an option to extract inputs to an archive
authorJoseph Huber <jhuber6@vols.utk.edu>
Thu, 22 Jun 2023 16:22:31 +0000 (11:22 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 23 Jun 2023 20:03:43 +0000 (15:03 -0500)
commit869baa9125736f6140ef770e4a3a852c5f9be505
treebf0d973d8d691d0c870f4a7796abc56b495f7033
parentc52268a9afe96078fde9ee778577341645465c38
[ClangPackager] Add an option to extract inputs to an archive

Currently we simply overwrite the output file if we get muliple matches
in the fatbinary. This patch introduces the `--archive` option which
allows us to combine all of the files into a static archive instead.
This is usefuly for creating a device specific static archive library
from a fatbinary.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D153568
clang/test/Driver/offload-packager.c
clang/tools/clang-offload-packager/ClangOffloadPackager.cpp