[lld-link] implement -thinlto-index-only
authorBob Haarman <llvm@inglorion.net>
Thu, 11 Jul 2019 18:03:14 +0000 (18:03 +0000)
committerBob Haarman <llvm@inglorion.net>
Thu, 11 Jul 2019 18:03:14 +0000 (18:03 +0000)
commit63efb28f47610e470cdf9332e2a38b6991cae6f4
tree321eda2a1b97ad709615c252a7128b8094ca5f8c
parent6add24adaf6a118022bfb66130fc5735b6451e68
[lld-link] implement -thinlto-index-only

Summary:
This implements -thinlto-index-only, -thinlto-index-only:,
and -thinlto-emit-imports-files options in lld-link. They are
analogous to their counterparts in ld.lld: -thinlto-index-only
causes us to perform ThinLTO's thin link and write index files,
but not perform code generation. -thinlto-index-only: does the
same, but also writes a text file listing the native object
files expected to be generated. -thinlto-emit-imports-files
creates a text file next to each index file, listing the files
to import from.

Reviewers: ruiu, tejohnson, pcc, rnk

Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, llvm-commits

Tags: #llvm

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

llvm-svn: 365800
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/LTO.cpp
lld/COFF/LTO.h
lld/COFF/Options.td
lld/test/COFF/Inputs/thinlto-empty.ll [new file with mode: 0644]
lld/test/COFF/Inputs/thinlto.ll [new file with mode: 0644]
lld/test/COFF/thinlto-emit-imports.ll [new file with mode: 0644]
lld/test/COFF/thinlto-index-only.ll [new file with mode: 0644]