[LLVMdev] LLVM use of C++ exceptions and RTTI

Francois Pichet pichet2000 at gmail.com
Thu Oct 14 13:47:59 PDT 2010


On Thu, Oct 14, 2010 at 4:09 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Francois,
>
>> In that case, RTTI and exception should also be disabled from CMake
>> generated projects right?
>> Currently they are enabled all over my MSVC projects.
>
> I'm not sure what you are asking.  The goal is for LLVM to not require
> RTTI or exception handling.  Thus these can be disabled by the build
> system (by specifying -fno-rtti etc), since they won't be used anyway.
> Not disabling them won't break anything however.

I am saying that if the makefile build system disables RTTI and
exception handling the CMake build system should also disable them.
3 reasons:
- To be consistent with the makefile build
- It will generate a compile error if someone who is not aware of the
rules try to use RTTI or exceptions.
- Surely there will be a small code size gain after disabling RTTI.
(let's me measure it)

I am not a CMake expert (hello Oscar!), but if nobody fix it. I'll try
to do it myself.

+1 for not allowing exception in LLVM and clang. I never liked exceptions.




More information about the llvm-dev mailing list