<div dir="auto">Hi,<br></div>
<div dir="auto">I have a dynamically loaded llvm pass built in-tree with ninja (generated with cmake, basically a copy of the hallo pass plugin, linux, llvm/clang version 6.0.1).<br></div>
<div dir="auto">It uses the ExecutionEngine.<br></div>
<div dir="auto">Building it without linking against LLVMExecutionEngine library results in an undefined symbol to the vtable of the EngineBuilder when loaded to opt. Linking the plugin with LLVMExecutionEngine results in the pass simply not being executable with giving "opt: Unkown command line argument '-passArg'." <br></div>
<div dir="auto">For a minimal example add set(LLVM_LINK_COMPONENTS Core) to the CMakeLists.txt of the Hello llvm pass. <br><br></div>
<div dir="auto">There is no error or warning at any point when linking or loading a plugin linked against someĀ libs. <br></div>
<div dir="auto">How do I find out which llvm libs I can't link with a dynamically loaded plugin?<br></div>
<div dir="auto">How can I use the EngineBuilder in my plugin with proper symbol resolution?<br><br></div>
<div dir="auto">For reproductivity:<br></div>
<div dir="auto">cmake -G "Sublime Text 2 - Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON -DLLVM_BUILD_TESTS=ON -DLLVM_BUILD_EXAMPLES=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_TOOL_CLANG_BUILD=ON -DLLVM_TOOL_CLANG_TOOLS_EXTRA=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DCLANG_BUILD_EXAMPLES=ON -DCLANG_PLUGIN_SUPPORT=ON<br><br></div>
<div dir="auto">Hope someone can help me out.<br></div>
<div dir="auto">Viktor<br></div>