[PATCH] D75879: [lld][WIP]Enabling loading LLVM pass plugins
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 15:40:20 PDT 2020
efriedma created this revision.
Herald added a subscriber: mgorny.
Herald added a project: LLVM.
Add the relevant magic bits to allow "-mllvm=-load=plugin.so" etc.
WIP because I've barely tested this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75879
Files:
lld/tools/lld/CMakeLists.txt
lld/tools/lld/lld.cpp
Index: lld/tools/lld/lld.cpp
===================================================================
--- lld/tools/lld/lld.cpp
+++ 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;
Index: lld/tools/lld/CMakeLists.txt
===================================================================
--- lld/tools/lld/CMakeLists.txt
+++ lld/tools/lld/CMakeLists.txt
@@ -4,7 +4,11 @@
add_lld_tool(lld
lld.cpp
+
+ ENABLE_PLUGINS
+ SUPPORT_PLUGINS
)
+export_executable_symbols(lld)
target_link_libraries(lld
PRIVATE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75879.249232.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200309/1658fd67/attachment.bin>
More information about the llvm-commits
mailing list