[llvm-dev] link error for analysis pass

Alex S via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 4 14:36:40 PST 2015


Hi Mehdi,

I meant when I build the LLVM and it will give the following errors:

make[2]: Entering directory `/home/alex/new/llvm-obj/tools/llc'
llvm[2]: Linking Debug+Asserts executable llc
/home/alex/new/llvm-obj/Debug+Asserts/lib/libLLVMCodeGen.a(Passes.o): In
function `llvm::TargetPassConfig::addIRPasses()':
/home/alex/new/llvm-3.1.src/lib/CodeGen/Passes.cpp:295: undefined reference
to `llvm::createMyAliasAnalysisPass()'
collect2: ld returned 1 exit status
make[2]: *** [/home/alex/new/llvm-obj/Debug+Asserts/bin/llc] Error 1
make[2]: Leaving directory `/home/alex/new/llvm-obj/tools/llc'
make[1]: *** [llc/.makeall] Error 2
make[1]: Leaving directory `/home/alex/new/llvm-obj/tools'
make: *** [all] Error 1


Thanks,
Alex


On Fri, Dec 4, 2015 at 5:17 PM, Mehdi Amini <mehdi.amini at apple.com> wrote:

>
> > On Dec 4, 2015, at 1:37 PM, Alex S via llvm-dev <llvm-dev at lists.llvm.org>
> wrote:
> >
> > Hi all,
> >
> > I create a folder containing my new alias analysis pass in the
> lib/Analysis folder of the source tree.
> > I mimic the way IPA did to create a LLVMipa.a library. That is, I write
> a Makefile to create my library
> > and I change the Makefile correspondingly in the Analysis folder.
> >
> > However, when I want to use my new alias analysis in the Codegen. The
> compiler will complain
> > "undefined error" during the link phase.  Could anyone point me out
> where I need to change in order
> > to use my new alias analysis pass in the Codegen?
>
>
> Can you provide the link command that fails and the output?
>
>
> Mehdi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151204/c33b0c21/attachment.html>


More information about the llvm-dev mailing list