forked from OSchip/llvm-project
[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
This commit is contained in:
parent
defd96f1e3
commit
f301806851
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue