[LLVMdev] llvm-config --cxxflags does not give the result the configuration script wants?

Jun-qi Deng dengjunqi06323011 at gmail.com
Wed Mar 14 18:21:26 PDT 2012


2012/3/14 =?utf-8?Q?=C3=93scar_Fuentes?= <ofv at wanadoo.es>

> Jun-qi Deng <dengjunqi06323011 at gmail.com> writes:
>
> > I got your point. Thank you, and I'd like to provide the relative message
> > now. But firstly, what do you mean by the "relevant command generated by
> > your makefile"? What I can tell you now is:
> >
> > The Error Message:
> > make[3]: Entering directory `/home/tang.kk/ppcg/ppcg/isl/interface'
> >   CXXLD  extract_interface
> > extract_interface.o:(.data.rel.ro._ZTI13MyASTConsumer[typeinfo for
> > MyASTConsumer]+0x10): undefined reference to `typeinfo for
> > clang::ASTConsumer'
> > collect2: ld returned 1 exit status
>
> [snip]
>
> So you define a class MyAstConsumer that derives from clang::ASTConsumer
> and then the link fails because the typinfo for MyAstConsumer can not
> reference the typeinfo of clang::ASTConsumer, because the latter is
> undefined as a consecuence of building Clang with -fno-rtti.
>

Oh, I got it! Thank you very much! It helps me a lot.

>
> In this case the right thing is to apply -fno-rtti to the specific
> source file that defines MyAstConsumer.
>
> Please note that deriving from a Clang/LLVM class is not something that
> all projects do. The typical compiler that uses LLVM as a backend does
> not need to derive from LLVM classes at all. Imposing -fno-rtti on those
> projects most likely would cause breakage on user's code.
>

Best Regards!
TangKK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120315/ac712c73/attachment.html>


More information about the llvm-dev mailing list