Enable new passmanager plugin support for LTO.
authorEli Friedman <efriedma@quicinc.com>
Thu, 26 Mar 2020 17:09:13 +0000 (10:09 -0700)
committerEli Friedman <efriedma@quicinc.com>
Tue, 14 Apr 2020 22:07:07 +0000 (15:07 -0700)
commitc285841a4fb7ab0ead76043649394c443b03e5fc
tree9de2e4102d91d65c63f09b54ec6a1dcd19d65c07
parentca99a70237c0c762c5d9872625865a8ac19e6c10
Enable new passmanager plugin support for LTO.

This should make both static and dynamic NewPM plugins work with LTO.
And as a bonus, it makes static linking of OldPM plugins more reliable
for plugins with both an OldPM and NewPM interface.

I only implemented the command-line flag to specify NewPM plugins in
llvm-lto2, to show it works. Support can be added for other tools later.

Differential Revision: https://reviews.llvm.org/D76866
lld/tools/lld/CMakeLists.txt
llvm/examples/Bye/Bye.cpp
llvm/include/llvm/LTO/Config.h
llvm/lib/LTO/CMakeLists.txt
llvm/lib/LTO/LTOBackend.cpp
llvm/test/Feature/load_extension.ll
llvm/test/lit.cfg.py
llvm/tools/llvm-lto2/CMakeLists.txt
llvm/tools/llvm-lto2/llvm-lto2.cpp