[cfe-dev] Disallow rtti
Andreas Bergmeier via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 25 01:35:40 PDT 2017
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.
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev