[ELF] Enable new passmanager plugin support for LTO
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 24 Mar 2022 06:52:16 +0000 (07:52 +0100)
committerRaphael Isemann <teemperor@gmail.com>
Thu, 24 Mar 2022 07:08:54 +0000 (08:08 +0100)
commit32012eb11b235e1560a253664095676ea8ebd027
treea296d3fa9d4b2dd5ad214048440b88fed168710d
parent107ce71849bccb8749a9ff369f22641f092be432
[ELF] Enable new passmanager plugin support for LTO

Add cli options for new passmanager plugin support to lld.

Currently it is not possible to load dynamic NewPM plugins with lld. This is an
incremental update to D76866. While that patch only added cli options for
llvm-lto2, this adds them for lld as well. This is especially useful for running
dynamic plugins on the linux kernel with LTO.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D120490
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/LTO.cpp
lld/ELF/Options.td
lld/test/CMakeLists.txt
lld/test/ELF/lto/ltopasses-extension.ll [new file with mode: 0644]
lld/test/lit.cfg.py
lld/test/lit.site.cfg.py.in
llvm/examples/Bye/Bye.cpp