[LinkerWrapper] Make ThinLTO work inside the linker wrapper
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 12 Jul 2022 14:10:54 +0000 (10:10 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 12 Jul 2022 15:46:46 +0000 (11:46 -0400)
commit86a49a4f4f50c2590716bdc440a97e89f5858a4f
treec1a73ca9c999228b9ba958995573a2ae1852711c
parent4b95a5a772530f78326941f26e5cb2c33212460f
[LinkerWrapper] Make ThinLTO work inside the linker wrapper

Summary:
Previous assumptions held that the LTO stage would only have a single
output. This is incorrect when using thinLTO which outputs multiple
files. Additionally there were some bugs with how we hanlded input that
cause problems when performing thinLTO. This patch addresses these
issues.

The performance of Thin-LTO is currently pretty bad. But I am content to
leave it that way as long as it compiles.
clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp