digitalmars.D.ldc - -fno-rtti (disable RTTI)?
- Denis Feklushkin (3/3) May 13 2020 Hi!
- IGotD- (4/7) May 13 2020 What is RTTI in a D language context? -fno-rtti is a switch for
- Denis Feklushkin (6/15) May 13 2020 Yes, I mean this thing - text names of types and stuff like that.
- kinke (5/6) May 13 2020 TypeInfos aren't emitted if there's no class TypeInfo in
- David Nadlinger (6/10) May 13 2020 In addition to this, there are also LDC_no_moduleinfo/LDC_no_typeinfo
- Denis Feklushkin (2/8) May 14 2020 Hmm, is suddenly for me. Why AAs needs TypeInfo?
- kinke (4/5) May 14 2020 See https://github.com/dlang/druntime/blob/master/src/rt/aaA.d -
Hi! Is there any way to disable RTTI? Perhaps some simple compiler patch?
May 13 2020
On Wednesday, 13 May 2020 at 09:49:33 UTC, Denis Feklushkin wrote:Hi! Is there any way to disable RTTI? Perhaps some simple compiler patch?What is RTTI in a D language context? -fno-rtti is a switch for C++ compilers and I'm not sure what the equivalent in D would be. Would that be the module info meta data?
May 13 2020
On Wednesday, 13 May 2020 at 10:10:13 UTC, IGotD- wrote:On Wednesday, 13 May 2020 at 09:49:33 UTC, Denis Feklushkin wrote:Yes, I mean this thing - text names of types and stuff like that. Maybe you remember that I am trying to port druntime to an embedded system. Now I have a binary about 90KB and I have a suspicion that several kilobytes occupied by type information and exceptions messages.Hi! Is there any way to disable RTTI? Perhaps some simple compiler patch?What is RTTI in a D language context? -fno-rtti is a switch for C++ compilers and I'm not sure what the equivalent in D would be. Would that be the module info meta data?
May 13 2020
On Wednesday, 13 May 2020 at 09:49:33 UTC, Denis Feklushkin wrote:Is there any way to disable RTTI?TypeInfos aren't emitted if there's no class TypeInfo in object.d. But then obviously everything that depends on them doesn't work, like associative arrays and GC allocations. - If a struct's TypeInfo isn't used, it should be stripped by the linker.
May 13 2020
On 13 May 2020, at 13:09, kinke via digitalmars-d-ldc wrote:TypeInfos aren't emitted if there's no class TypeInfo in object.d. But then obviously everything that depends on them doesn't work, like associative arrays and GC allocations. - If a struct's TypeInfo isn't used, it should be stripped by the linker.In addition to this, there are also LDC_no_moduleinfo/LDC_no_typeinfo for more fine-grained control; see https://wiki.dlang.org/LDC-specific_language_changes#Pragmas. (I haven't use those myself in a while.) — David
May 13 2020
On Wednesday, 13 May 2020 at 12:09:09 UTC, kinke wrote:On Wednesday, 13 May 2020 at 09:49:33 UTC, Denis Feklushkin wrote:Hmm, is suddenly for me. Why AAs needs TypeInfo?Is there any way to disable RTTI?TypeInfos aren't emitted if there's no class TypeInfo in object.d. But then obviously everything that depends on them doesn't work, like associative arrays
May 14 2020
On Thursday, 14 May 2020 at 16:05:41 UTC, Denis Feklushkin wrote:Hmm, is suddenly for me. Why AAs needs TypeInfo?See https://github.com/dlang/druntime/blob/master/src/rt/aaA.d - apparently for hashing & equality of keys, plus destruction of keys & values.
May 14 2020