gou4shi1 added a comment. In D54978#1457318 <https://reviews.llvm.org/D54978#1457318>, @mikhail.ramalho wrote:
> In D54978#1447107 <https://reviews.llvm.org/D54978#1447107>, @gou4shi1 wrote: > > > My own out-of-tree pass `#include <llvm/Support/SMTAPI.h>` and use cmake's > > `add_llvm_library` to compile it into a `.so` > > However, `opt -load-pass-plugin=my-pass.so -passes="foo" bar.ll` fails: > > `opt: symbol lookup error: Passes/libStackPasses.so: undefined symbol: > > _ZN4llvm14CreateZ3SolverEv` > > (c++filt: `llvm::CreateZ3Solver()`) > > If I move the content of `Z3Solver.cpp` into another file of > > `llvm/Support` (like `llvm/Support/raw_ostream.cpp`) > > everything works. > > > I can't reproduce the error, can you send me a small example? I build llvm with `cmake -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=clang ../llvm` I have make a mini reproduce example at https://github.com/gou4shi1/mini-repro-pass you can build this example with `mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug .. && make` you can run this example with `opt -load-pass-plugin=ttttt/ttttt.so -passes="ttttt" ../test/add100.ll` Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54978/new/ https://reviews.llvm.org/D54978 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits