I want to reduce the size of my llvm thirty party porject, so i reference this patch tpu-mlir/0001-adjust-for-tpu-mlir.patch at master · sophgo/tpu-mlir · GitHub
but when i compile my project with lib and bin of llvm , the following error occurs:
/usr/bin/ld: …/…/…/…/lib/libXRTransform.a(XRTGraphOptPass.cpp.o): in function mlir::applyPatternsAndFoldGreedily(mlir::Operation*, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig)': /home/wusq10/develop/XpengRT/third_party/llvm-project/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h:75: undefined reference to
mlir::applyPatternsAndFoldGreedily(llvm::MutableArrayRefmlir::Region, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig)’
/usr/bin/ld: /home/wusq10/develop/XpengRT/third_party/llvm-project/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h:75: undefined reference to mlir::applyPatternsAndFoldGreedily(llvm::MutableArrayRef<mlir::Region>, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig)' /usr/bin/ld: /home/wusq10/develop/XpengRT/third_party/llvm-project/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h:75: undefined reference to
mlir::applyPatternsAndFoldGreedily(llvm::MutableArrayRefmlir::Region, mlir::FrozenRewritePatternSet const&, mlir::GreedyRewriteConfig)’
[ 95%] Linking CXX executable xp_converter_example
[ 95%] Linking CXX shared library libxprt_quantize.so
[ 95%] Built target xp_converter_example
/usr/bin/ld: /home/wusq10/develop/XpengRT/third_party/llvm-project/build/lib/libMLIRRewrite.a(FrozenRewritePatternSet.cpp.o): in function convertPDLToPDLInterp(mlir::ModuleOp, llvm::DenseMap<mlir::Operation*, mlir::PDLPatternConfigSet*, llvm::DenseMapInfo<mlir::Operation*, void>, llvm::detail::DenseMapPair<mlir::Operation*, mlir::PDLPatternConfigSet*> >&) [clone .constprop.0]': FrozenRewritePatternSet.cpp:(.text._ZL21convertPDLToPDLInterpN4mlir8ModuleOpERN4llvm8DenseMapIPNS_9OperationEPNS_19PDLPatternConfigSetENS1_12DenseMapInfoIS4_vEENS1_6detail12DenseMapPairIS4_S6_EEEE.constprop.0+0x1e1): undefined reference to
mlir::createPDLToPDLInterpPass(llvm::DenseMap<mlir::Operation*, mlir::PDLPatternConfigSet*, llvm::DenseMapInfo<mlir::Operation*, void>, llvm::detail::DenseMapPair<mlir::Operation*, mlir::PDLPatternConfigSet*> >&)’
[ 95%] Built target xprt_quantize