diff options
author | Eli Friedman <efriedma@quicinc.com> | 2020-03-23 12:20:05 -0700 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2020-03-23 14:18:32 -0700 |
commit | f3018068517e350f509b40f50207db25f80ff6fc (patch) | |
tree | 0b75b980ac838e627f9005877b557e6cdd1f3095 /lld/tools | |
parent | defd96f1e36df9e3bbb7be7b55a14b843c3090c6 (diff) | |
download | llvm-f3018068517e350f509b40f50207db25f80ff6fc.zip llvm-f3018068517e350f509b40f50207db25f80ff6fc.tar.gz llvm-f3018068517e350f509b40f50207db25f80ff6fc.tar.bz2 |
[lld] Enabling loading LLVM pass plugins
Add the relevant magic bits to allow "-mllvm=-load=plugin.so" etc.
This is now using export_executable_symbols_for_plugins, so symbols are
only exported if plugins are enabled.
Differential Revision: https://reviews.llvm.org/D75879
Diffstat (limited to 'lld/tools')
-rw-r--r-- | lld/tools/lld/CMakeLists.txt | 4 | ||||
-rw-r--r-- | lld/tools/lld/lld.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt index a15e296..a37c2c7 100644 --- a/lld/tools/lld/CMakeLists.txt +++ b/lld/tools/lld/CMakeLists.txt @@ -4,7 +4,11 @@ set(LLVM_LINK_COMPONENTS add_lld_tool(lld lld.cpp + + ENABLE_PLUGINS + SUPPORT_PLUGINS ) +export_executable_symbols_for_plugins(lld) target_link_libraries(lld PRIVATE diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp index 72ff758..646fc3d 100644 --- a/lld/tools/lld/lld.cpp +++ b/lld/tools/lld/lld.cpp @@ -36,6 +36,7 @@ #include "llvm/Support/Host.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/Path.h" +#include "llvm/Support/PluginLoader.h" #include <cstdlib> using namespace lld; |