Skip to content

Commit f301806

Browse files
committed
[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
1 parent defd96f commit f301806

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lld/tools/lld/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ set(LLVM_LINK_COMPONENTS
44

55
add_lld_tool(lld
66
lld.cpp
7+
8+
ENABLE_PLUGINS
9+
SUPPORT_PLUGINS
710
)
11+
export_executable_symbols_for_plugins(lld)
812

913
target_link_libraries(lld
1014
PRIVATE

lld/tools/lld/lld.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "llvm/Support/Host.h"
3737
#include "llvm/Support/InitLLVM.h"
3838
#include "llvm/Support/Path.h"
39+
#include "llvm/Support/PluginLoader.h"
3940
#include <cstdlib>
4041

4142
using namespace lld;

0 commit comments

Comments
 (0)