[cfe-dev] Disallow rtti
Andreas Bergmeier via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 25 01:35:40 PDT 2017
Exactly that.
So will have no RTTI, no dynamic_cast, no thread_local, no exceptions, no
new, no libc++
Just a very stripped down version of C++ (is there any other similar,
stripped down toolchain!?).
Still trying to find, how I can have the code fail when attempting rtti.
Seems like there is no such capability via the Driver interface.
On Wed, Oct 25, 2017 at 10:25 AM David Chisnall via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> On 24 Oct 2017, at 18:48, Martin J. O'Riordan via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> >
> > I have not found the overhead of RTTI to be a significant burden (even
> for embedded with a 128KB memory size constraint)
>
> With only 128KB of ROM, you’re going to find it hard to fit a C++ runtime
> library (though if you rip out the demangler you’ll save quite a lot), so
> even if you compile with RTTI, you won’t be able to use it or throw
> exceptions. A stack unwinder plus the C++ personality function can easily
> add up to more than the ROM on such devices. It’s possible to fit just
> enough support for dynamic_cast on such a system, but it’s somewhat awkward
> to have dynamic_cast working but exceptions not working.
>
> David
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171025/8c0f30c7/attachment.html>
More information about the cfe-dev
mailing list