On Thursday, 20 August 2015 at 06:50:51 UTC, Rikki Cattermole wrote:

Humm, I wonder if we could strip it out before the final link.


I tried a number of things, all discussed on the D.gnu forum (http://forum.dlang.org/post/quemhwpgijwmqtpxu...@forum.dlang.org). The only hack that worked some of the time was to compile to assembly, use a sed script to modify the assembly, and then compile the modified assembly. That's pretty ridiculous. I can't go to my employer with that and I don't think anyone will take me seriously if my projects contain such things.

A few compiler devs threw me a bone with an -fno-rtti implementation. I am very grateful to those who worked on that and I think it has great value, but it forces me to compromise on slicing, postblit, and a few others, and that severely diminished its appeal. This specific issue, TypeInfo bloat, is just a symptom of a more general problem in the D toolchain, namely, dead code elimination.

This is not an opportunity to find clever hacks and workarounds, its an opportunity to improve the compiler and linker.

Mike

Reply via email to