[LLVMdev] Undefined symbol when loading pass
willdtz at gmail.com
Wed Jun 16 18:17:50 PDT 2010
I'm running into a problem with building a pass from an external
project and then loading it in opt.
I'm making use of "Triple" in my pass, to detect the architecture
we're building for.
Triple is part of the LLVMSupport component...
Anyway, my problem is this:
--if I don't add 'support' to LINK_COMPONENTS, opt bails claiming it
doesn't have a definition for Triple::Parse when loading the pass.
--if I do link in LLVMSupport, the pass runs, but opt is unhappy
because various commandline options are defined twice (presumably by
opt's copy of pieces of llvmsupport). The pass does seem to run as
expected however, but spitting out errors isn't desired behavior...
This would go away I think if my pass wasn't loaded dynamically and
was built into opt, but that's not really an option presently.
Is there some other/better way to build this, or any suggestions you might have?
Thanks for your time,
More information about the llvm-dev