diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt --- a/lld/tools/lld/CMakeLists.txt +++ b/lld/tools/lld/CMakeLists.txt @@ -4,7 +4,11 @@ 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 --- 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 using namespace lld;