mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user