[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Fri Feb 19 02:59:30 PST 2010


On 02/19/2010 12:54 PM, Chandler Carruth wrote:
> IMO, if you wish to preserve the ability to ever turn off RTTI, you
> must turn it off by default for the developers' builds so that any
> code which might depend on RTTI breaks immediately. Otherwise, it
> seems only a matter of time before dependencies slowly creep back into
> the code base. This has certainly proven true with GCC warnings. =/ I
> think Nick has it right: developers should build with the most
> restrictive settings expected to work, packagers should build with the
> most forgiving settings they can tolerate.

Yes, I see the point and benefits in having RTTI disabled by default
during LLVM development.

Releases are a different story. That is, what should the distributed
tar balls configure with by default. IMHO end users should get RTTI
enabled by default as it is less likely to break stuff for them later.

I mean, one doesn't usually think things like this when one
installs a piece of software from sources: "Maybe I should disable
this default flag because maybe a software I'm going to try
in 3 weeks breaks unless I do it".

As far as I know, RTTI enabled should not increase execution time in
case RTTI features (typeinfo, dynamic_cast) are not used. Please
correct me if I'm wrong.

-- 
Pekka



More information about the llvm-dev mailing list