[LLVMdev] compiling clang with rtti

Daniel Dunbar daniel at zuster.org
Fri Sep 11 08:39:28 PDT 2009

Hi Olaf,

On Fri, Sep 11, 2009 at 5:24 AM, Olaf Krzikalla
<Olaf.Krzikalla at tu-dresden.de> wrote:
> Hi @clang,
> I'm somewhat puzzled about using rtti when building clang under gcc (gcc
> 4.3.3, linux/ubuntu).
> (There is no problem under MSVC since rtti seems to be active there anyway).
> The appropriate line 348 in llvm/makefile.rules is commented out meaning
> that llvm is usually compiled using rtti. However every clang lib adds
> -fno-rtti to CXXFLAGS by hand.
> This is not filtered out by makefile.rules even if REQUIRES_RTTI is
> defined (IMHO -fno-rtti should be filtered out in that case).
> Now I'm two-way bewildered.
> First: why is line 348 commented out? This renders REQUIRES_RTTI
> useless. Does rtti (llvm) and non-rtti (clang) code work together at
> all? I had serious trouble when trying this with my own application and
> eventually resigned .

Dunno, but I think its fine to fix REQUIRES_RTTI, I'll do so right now.

> I'm forced to use rtti in my application as it uses some clang libs but
> also some tr1 stuff (which apparently needs rtti) and boost. This leads
> me to the second question:

That doesn't necessarily explain why you are forced to use RTTI (just
as clang doesn't use RTTI but LLVM does, and only the LLVM parts build
with RTTI).

 - Daniel

More information about the llvm-dev mailing list