My pass compiles fine with Gmake,but when i run it with ‘opt’ it was initially breaking with the following error message :
“Error opening ‘…/…/…/Release/lib/ReusePass.so’: …/…/…/Release/lib/ReusePass.so: undefined symbol: _ZNK4llvm4Pass5printERSoPKNS_6ModuleE
-load request ignored.
opt: Unknown command line argument ‘-ReusePass’.”
Then i changed my Makefile to include the libaries : LLVMSystem.a, LLVMSupport.a, LLVMCore.a.
Now the ‘opt’ command breaks witht he following error : " Two passes with the same argument (-domtree) attempted to be registered!
UNREACHABLE executed! "
I also tried changing the “LLVMLIBS” line in the Makefile to “LINK_COMPONENTS” and the problem still persists.
Can u tell me why this happening and whats the work around for this?.