[OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 7 Jan 2022 22:12:51 +0000 (17:12 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 1 Feb 2022 04:11:41 +0000 (23:11 -0500)
commitc732c3df749b3d5a127708c05656a226ed5753ab
treee6ea22f0ba482cb91d8b7c650b3f777c9de1e5db
parent0e82c7553be95343f1cb62946eb0b84bd26f1563
[OpenMP] Initial Implementation of LTO and bitcode linking in linker wrapper

This patch implements the fist support for handling LTO in the
offloading pipeline. The flag `-foffload-lto` is used to control if
bitcode is embedded into the device. If bitcode is found in the device,
the extracted files will be sent to the LTO pipeline to be linked and
sent to the backend. This implementation does not separately link the
device bitcode libraries yet.

Depends on D116675

Differential Revision: https://reviews.llvm.org/D116975
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/tools/clang-linker-wrapper/CMakeLists.txt
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp