D: pay for what you use?
Mike
none at none.com
Thu Feb 13 15:56:54 PST 2014
On Thursday, 13 February 2014 at 21:08:01 UTC, Mike wrote:
>
>> 2) Is it possible to fully disable runtime type information? I
>> understand that being able to get different information about
>> object type in the runtime may be very useful, but I've never
>> used it. However D compilers do generate RTTI-tables no matter
>> what with all class names, module names and etc.
>
> I use -ffunction-sections and -fdata-sections, in collusion
> with ld's --gc-sections to strip out stuff I'm not using. This
> can also be done with a custom linker script. Again, my wiki
> describes this.
>
> To get GDC just to compile my code, I've had to stub out the
> TypeInfo stuff in object.d/di. I have a 20 line object.d that
> allows me to declare structs [6]. With one or two more stubs,
> I can have classes with static properties. I have the code,
> but I haven't checked it in yet.
>
> There was an excellent discussion about this on the forum [7].
> I encourage you to read it if you're really serious about your
> pursuit of this knowledge.
>
> [7]
> http://forum.dlang.org/post/jynxfglpulguvqbivrms@forum.dlang.org
I forgot to add the LDC has some useful features for this [1].
See the LDC_no_typeinfo and LDC_no_moduleinfo pragmas.
Mike
[1] http://wiki.dlang.org/LDC-specific_language_changes
More information about the Digitalmars-d
mailing list